(function (e, t) {
    var n = function () {
        var t = e._data(document, "events");
        return t && t.click && e.grep(t.click,function (e) {
            return e.namespace === "rails"
        }).length
    };
    n() && e.error("jquery-ujs has already been loaded!");
    var r;
    e.rails = r = {linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]", inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]", formSubmitSelector:"form", formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])", disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]", enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled", requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])", fileInputSelector:"input[type=file]", linkDisableSelector:"a[data-disable-with]", CSRFProtection:function (t) {
        var n = e('meta[name="csrf-token"]').attr("content");
        n && t.setRequestHeader("X-CSRF-Token", n)
    }, fire:function (t, n, r) {
        var i = e.Event(n);
        return t.trigger(i, r), i.result !== !1
    }, confirm:function (e) {
        return confirm(e)
    }, ajax:function (t) {
        return e.ajax(t)
    }, href:function (e) {
        return e.attr("href")
    }, handleRemote:function (n) {
        var i, s, o, u, a, f, l, c;
        if (r.fire(n, "ajax:before")) {
            u = n.data("cross-domain"), a = u === t ? null : u, f = n.data("with-credentials") || null, l = n.data("type") || e.ajaxSettings && e.ajaxSettings.dataType;
            if (n.is("form")) {
                i = n.attr("method"), s = n.attr("action"), o = n.serializeArray();
                var h = n.data("ujs:submit-button");
                h && (o.push(h), n.data("ujs:submit-button", null))
            } else n.is(r.inputChangeSelector) ? (i = n.data("method"), s = n.data("url"), o = n.serialize(), n.data("params") && (o = o + "&" + n.data("params"))) : (i = n.data("method"), s = r.href(n), o = n.data("params") || null);
            c = {type:i || "GET", data:o, dataType:l, beforeSend:function (e, i) {
                return i.dataType === t && e.setRequestHeader("accept", "*/*;q=0.5, " + i.accepts.script), r.fire(n, "ajax:beforeSend", [e, i])
            }, success:function (e, t, r) {
                n.trigger("ajax:success", [e, t, r])
            }, complete:function (e, t) {
                n.trigger("ajax:complete", [e, t])
            }, error:function (e, t, r) {
                n.trigger("ajax:error", [e, t, r])
            }, crossDomain:a}, f && (c.xhrFields = {withCredentials:f}), s && (c.url = s);
            var p = r.ajax(c);
            return n.trigger("ajax:send", p), p
        }
        return!1
    }, handleMethod:function (n) {
        var i = r.href(n), s = n.data("method"), o = n.attr("target"), u = e("meta[name=csrf-token]").attr("content"), a = e("meta[name=csrf-param]").attr("content"), f = e('<form method="post" action="' + i + '"></form>'), l = '<input name="_method" value="' + s + '" type="hidden" />';
        a !== t && u !== t && (l += '<input name="' + a + '" value="' + u + '" type="hidden" />'), o && f.attr("target", o), f.hide().append(l).appendTo("body"), f.submit()
    }, disableFormElements:function (t) {
        t.find(r.disableSelector).each(function () {
            var t = e(this), n = t.is("button") ? "html" : "val";
            t.data("ujs:enable-with", t[n]()), t[n](t.data("disable-with")), t.prop("disabled", !0)
        })
    }, enableFormElements:function (t) {
        t.find(r.enableSelector).each(function () {
            var t = e(this), n = t.is("button") ? "html" : "val";
            t.data("ujs:enable-with") && t[n](t.data("ujs:enable-with")), t.prop("disabled", !1)
        })
    }, allowAction:function (e) {
        var t = e.data("confirm"), n = !1, i;
        return t ? (r.fire(e, "confirm") && (n = r.confirm(t), i = r.fire(e, "confirm:complete", [n])), n && i) : !0
    }, blankInputs:function (t, n, r) {
        var i = e(), s, o, u = n || "input,textarea", a = t.find(u);
        return a.each(function () {
            s = e(this), o = s.is("input[type=checkbox],input[type=radio]") ? s.is(":checked") : s.val();
            if (!o == !r) {
                if (s.is("input[type=radio]") && a.filter('input[type=radio]:checked[name="' + s.attr("name") + '"]').length)return!0;
                i = i.add(s)
            }
        }), i.length ? i : !1
    }, nonBlankInputs:function (e, t) {
        return r.blankInputs(e, t, !0)
    }, stopEverything:function (t) {
        return e(t.target).trigger("ujs:everythingStopped"), t.stopImmediatePropagation(), !1
    }, callFormSubmitBindings:function (n, r) {
        var i = n.data("events"), s = !0;
        return i !== t && i.submit !== t && e.each(i.submit, function (e, t) {
            if (typeof t.handler == "function")return s = t.handler(r)
        }), s
    }, disableElement:function (e) {
        e.data("ujs:enable-with", e.html()), e.html(e.data("disable-with")), e.bind("click.railsDisable", function (e) {
            return r.stopEverything(e)
        })
    }, enableElement:function (e) {
        e.data("ujs:enable-with") !== t && (e.html(e.data("ujs:enable-with")), e.data("ujs:enable-with", !1)), e.unbind("click.railsDisable")
    }}, r.fire(e(document), "rails:attachBindings") && (e.ajaxPrefilter(function (e, t, n) {
        e.crossDomain || r.CSRFProtection(n)
    }), e(document).delegate(r.linkDisableSelector, "ajax:complete", function () {
        r.enableElement(e(this))
    }), e(document).delegate(r.linkClickSelector, "click.rails", function (n) {
        var i = e(this), s = i.data("method"), o = i.data("params");
        if (!r.allowAction(i))return r.stopEverything(n);
        i.is(r.linkDisableSelector) && r.disableElement(i);
        if (i.data("remote") !== t) {
            if ((n.metaKey || n.ctrlKey) && (!s || s === "GET") && !o)return!0;
            var u = r.handleRemote(i);
            return u === !1 ? r.enableElement(i) : u.error(function () {
                r.enableElement(i)
            }), !1
        }
        if (i.data("method"))return r.handleMethod(i), !1
    }), e(document).delegate(r.inputChangeSelector, "change.rails", function (t) {
        var n = e(this);
        return r.allowAction(n) ? (r.handleRemote(n), !1) : r.stopEverything(t)
    }), e(document).delegate(r.formSubmitSelector, "submit.rails", function (n) {
        var i = e(this), s = i.data("remote") !== t, o = r.blankInputs(i, r.requiredInputSelector), u = r.nonBlankInputs(i, r.fileInputSelector);
        if (!r.allowAction(i))return r.stopEverything(n);
        if (o && i.attr("novalidate") == t && r.fire(i, "ajax:aborted:required", [o]))return r.stopEverything(n);
        if (s) {
            if (u) {
                setTimeout(function () {
                    r.disableFormElements(i)
                }, 13);
                var a = r.fire(i, "ajax:aborted:file", [u]);
                return a || setTimeout(function () {
                    r.enableFormElements(i)
                }, 13), a
            }
            return!e.support.submitBubbles && e().jquery < "1.7" && r.callFormSubmitBindings(i, n) === !1 ? r.stopEverything(n) : (r.handleRemote(i), !1)
        }
        setTimeout(function () {
            r.disableFormElements(i)
        }, 13)
    }), e(document).delegate(r.formInputClickSelector, "click.rails", function (t) {
        var n = e(this);
        if (!r.allowAction(n))return r.stopEverything(t);
        var i = n.attr("name"), s = i ? {name:i, value:n.val()} : null;
        n.closest("form").data("ujs:submit-button", s)
    }), e(document).delegate(r.formSubmitSelector, "ajax:beforeSend.rails", function (t) {
        this == t.target && r.disableFormElements(e(this))
    }), e(document).delegate(r.formSubmitSelector, "ajax:complete.rails", function (t) {
        this == t.target && r.enableFormElements(e(this))
    }), e(function () {
        var t = e("meta[name=csrf-token]").attr("content"), n = e("meta[name=csrf-param]").attr("content");
        e('form input[name="' + n + '"]').val(t)
    }))
})(jQuery), window.console = window.console || {info:jQuery.noop, debug:jQuery.noop, log:jQuery.noop, trace:jQuery.noop, error:jQuery.noop};
var package_arguments = function (e) {
    return Array.prototype.slice.call(e)
};
jQuery.any = function (e, t) {
    return $.map(e,function (e, n) {
        var r = t(e);
        if (r)return r
    }).length > 0
}, jQuery.mixpanel = function (e, t) {
    mixpanel[e].apply(mixpanel, t)
}, jQuery.track = function (e, t) {
    jQuery.mixpanel("track", [e, t])
}, jQuery.alias = function (e) {
    jQuery.mixpanel("alias", [e])
}, jQuery.identify = function (e) {
    jQuery.mixpanel("identify", [e])
}, jQuery.register = function (e) {
    jQuery.mixpanel("register", [e])
}, jQuery.adroll = {cart:function () {
    this.track("add_to_bag")
}, checkout:function () {
    this.track("checkout_button")
}, purchase:function () {
    this.track("place_order")
}, signup:function () {
    this.track("join_now_login")
}, signin:function () {
    this.track("registered_user_login")
}, track:function (e) {
    window.adroll_segments = e, window.__adroll_loaded && window.__adroll && window.__adroll.render_pixel_code(window.adroll_adv_id, window.adroll_pix_id)
}}, makeDropDowns = function () {
    new E.lib.AccountDropDown($("#account-trigger"), $(".account-dropdown"));
    var e = [], t = $(".shop-li[data-name=women]"), n = $(".shop-drop-down[data-name=women]"), r = $(".shop-li[data-name=men]"), i = $(".shop-drop-down[data-name=men]");
    t.each(function (t, r) {
        e.push({trigger:$(r), dropDown:$(n[t]), isSticky:$(n[t]).hasClass("sticky")})
    }), r.each(function (t, n) {
        e.push({trigger:$(n), dropDown:$(i[t]), isSticky:$(i[t]).hasClass("sticky")})
    });
    for (var s = 0; s < e.length; s++)e[s].isSticky ? new E.lib.StickyShopDropDown($(e[s].trigger), $(e[s].dropDown)) : new E.lib.ShopDropDown($(e[s].trigger), $(e[s].dropDown))
}, $(document).ready(function () {
    $("input, textarea").placeholder()
}), jQuery.fn.fadeAndReplace = function (e, t) {
    return this.fadeOut("slow"), this.queue(function () {
        $(this).text(e), $(this).dequeue()
    }), this.fadeIn("fast", function () {
        t && t()
    }), this
}, function (e) {
    e.fn.EverlaneCollectionImage = function (t) {
        if (E.lib.Helpers.isMobile())return;
        t = t || {};
        var n = t.speed || 300;
        return this.each(function () {
            var t = e(this).parent(), r = t.attr("href"), i = e(this).find(".size-tray"), s = i.find(".tray-size"), o = e(this).find("img"), u = o.clone().attr("src", o.data("hover-src")).css({display:"none", position:"absolute", bottom:0, left:0}).appendTo(e(this));
            e(this).on("mouseenter", function () {
                u.stop(!1, !0).fadeIn(n), i.stop(!1, !0).show().animate({opacity:.7}, n)
            }), e(this).on("mouseleave", function () {
                u.stop(!1, !0).fadeOut(n), i.stop(!1, !0).animate({opacity:0}, n)
            }), s.on("click", function (e) {
                var n = s.index(e.currentTarget);
                t.attr("href", r + "?size=" + n)
            })
        })
    }
}(jQuery), function () {
    window.E = window.E || {lib:{}, page:{}, pages:{product:{}, collection:{}, map:{}}, staticImageURL:"//dns4jlfurg7hp.cloudfront.net/static/", sub:function (t, n) {
        e.bind(t, n)
    }, pub:function (t, n) {
        e.trigger(t, n)
    }, object:{keys:function (e) {
        if (Object.hasOwnProperty("keys"))return Object.keys(e);
        var t = [];
        for (var n in e)e.hasOwnProperty(n) && t.push(n);
        return t
    }}, inherit:function (e, t) {
        function n() {
        }

        n.prototype = t.prototype, e.superClass_ = t.prototype, e.prototype = new n, e.prototype.constructor = e
    }, base:function (e, t, n) {
        var r = arguments.callee.caller;
        if (r.superClass_)return r.superClass_.constructor.apply(e, Array.prototype.slice.call(arguments, 1));
        var i = Array.prototype.slice.call(arguments, 2), s = !1;
        for (var o = e.constructor; o; o = o.superClass_ && o.superClass_.constructor)if (o.prototype[t] === r)s = !0; else if (s)return o.prototype[t].apply(e, i);
        if (e[t] === r)return e.constructor.prototype[t].apply(e, i);
        throw Error("E.base called from a method of one name to a method of a different name")
    }, addSingletonGetter:function (e) {
        e.getInstance = function () {
            return e.instance_ ? e.instance_ : e.instance_ = new e
        }
    }, inRange:function (e, t, n) {
        return!isNaN(e) && e >= t && e <= n
    }};
    var e = $(window.E)
}(), E.lib.Slides = function (e) {
    e = e || {}, this.creepDuration = 4e3, this.creepDistance = 10, this.moveDuration = e.moveDuration || 1500, this.pauseDuration = 0, this.initDuration = 1500, this.afterInit = e.afterInit || $.noop, this.beforeInit = e.beforeInit || $.noop, this.container = $(e.container), this.nextButton = $(e.nextButton), this.prevButton = $(e.prevButton), this.proxy = $({});
    var t = this.container, n = this, r = this.viewport = t.find(".viewport");
    return r.find(".slide").css({position:"absolute", width:"100%", height:"100%", display:"none", top:0, left:0, zIndex:10}), $(window).resize(function () {
        n.resize()
    }), this.resize(), this.beforeInit(), this.slides = this.viewport.find(".slide"), this.currentSlide().css({opacity:0}).show(), this.vCenter(this.currentSlide()), this.currentSlide().animate({opacity:1}, this.initDuration, function () {
        n.afterInit(n, n.currentSlide()), n.play()
    }), this.nextButton.on("click", function () {
        n.next()
    }), this.prevButton.on("click", function () {
        n.prev()
    }), this
}, $.extend(E.lib.Slides.prototype, {resize:function () {
    var e = this.container.width(), t = this.container.height();
    this.viewport.css({width:e, height:t}), this.proxy.trigger("resize", [e, t])
}, rollIn:function (e, t, n) {
    e.find(".slide-content").children().each(function (e) {
        $(this).delay(e * t).animate({opacity:1}, n)
    })
}, rollOut:function (e, t, n) {
    e.find(".slide-content").children().each(function (e) {
        $(this).delay(e * t).animate({opacity:0}, n)
    })
}, vCenter:function (e) {
    var t = e.find(".slide-content");
    t.hasClass("v-center") && t.css({marginTop:-t.height() / 2})
}, next:function (e, t) {
    if (this.lock)return!1;
    this.lock = !0;
    var n = this;
    t = t || $.noop, n.proxy.trigger("next", [n.nextSlide().index()]), this.transition(this.currentSlide(), this.nextSlide(), "right", e, function () {
        t(n, n.currentSlide())
    })
}, prev:function (e, t) {
    if (this.lock)return!1;
    this.lock = !0;
    var n = this;
    t = t || $.noop, n.proxy.trigger("prev", [n.prevSlide().index()]), this.transition(this.currentSlide(), this.prevSlide(), "left", e, function () {
        t(n, n.currentSlide())
    })
}, transition:function (e, t, n, r, i) {
    i = i || $.noop, r = typeof r == "number" ? r : this.moveDuration;
    var s = this, o = n == "right" ? 1 : -1;
    return t.css({left:o * this.container.width(), display:"block"}), this.vCenter(t), t.animate({left:0}, r, "easeInOutQuad"), e.animate({left:-o * this.container.width()}, r, "easeInOutQuad", function () {
        $(this).hide(), s._cS = t, s.lock = !1, i(), s.proxy.trigger("transition", [s.currentSlide().index()])
    }), !0
}, play:function () {
}, slideAt:function (e) {
    return $(this.slides[e])
}, currentSlide:function () {
    return this._cS = this._cS || this.slides.first(), this._cS
}, nextSlide:function () {
    var e = this.currentSlide().next();
    return e.length > 0 ? e : this.slides.first()
}, prevSlide:function () {
    var e = this.currentSlide().prev();
    return e.length > 0 ? e : this.slides.last()
}}), !function (e) {
    e.fn.EverlaneSlides = function (t) {
        return new E.lib.Slides(e.extend({container:this}, t))
    }
}(jQuery), $(function () {
    $("#share").click(function () {
        this.select()
    }), $(document).on("click", ".facebook_connect", function (e) {
        FB.getLoginStatus(function (e) {
            e.status == "connected" ? $.post("/users", e.authResponse) : FB.login(function (e) {
                e.authResponse ? $.post("/users", e.authResponse) : (E.page.LandingSlider.toggleBottomBar(!0), E.page.LandingSlider.slide(2, "marginTop"))
            }, {scope:"email,user_birthday,user_location"})
        }), e.preventDefault()
    }), !function () {
        var e = null;
        E.sub("push_url", function (t, n) {
            e = n
        }), $(document).on("click", ".share-pinterest", function (t) {
            var n = $(this), r = screen.width / 2 - 332.5, i = screen.height / 2 - 165, s = $.cookie("invite_url") || window.location.host, o = s + (e || n.data("pinPath")), u = "http://pinterest.com/pin/create/button/?url=" + escape(o) + "&amp;media=" + escape($(".product-photo img").attr("src")) + "&amp;description=" + n.data("pinText");
            window.open(u, "pin", "height=330,width=700,resizable=1,left=" + r + ",top=" + i), t.preventDefault()
        })
    }(), $(document).on("click", ".toggle-modal-login", function () {
        $("#signup_prompt").reveal()
    }), E.showLoginPrompt = function () {
        E.page.LandingSlider = new LandingSlider($(".slides"), 444, 444), E.page.LandingSlider.jump(2), $("html, body").animate({scrollTop:0}, 300, "easeOutQuart", function () {
            $("#modal-container").reveal()
        })
    }, $(document).on("click", ".login-prompt", function (e) {
        e.preventDefault(), E.showLoginPrompt()
    }), $(".scroll-to").on("click", function (e) {
        e.preventDefault();
        var t = $(e.currentTarget);
        $("html, body").animate({scrollTop:$(t.attr("href")).offset().top}, 400, "easeInOutQuad")
    }), $(".tooltip").tipTip()
}), $(function () {
    function s(e) {
        e ? $(".default-controls").fadeOut(function () {
            $("#fullwidth").addClass("import"), setTimeout(function () {
                $("#import-controls").fadeIn()
            }, 750)
        }) : $("#import-controls").fadeOut(function () {
            $("#fullwidth").removeClass("import"), setTimeout(function () {
                $(".default-controls").fadeIn()
            }, 750)
        })
    }

    function o(t, n) {
        var r = $.extend({"max-results":e, "start-index":1 + t * e, orderby:"lastmodified", sortorder:"descending", v:"3.0", alt:"json"}, window.authParams);
        $.getJSON("https://www.google.com/m8/feeds/contacts/default/full", r, function (r) {
            r = r.feed, $.each(r.entry, function (e, t) {
                u(t)
            });
            var i = parseInt(r.openSearch$totalResults.$t);
            i > (t + 1) * e ? o(t + 1, n) : n && n()
        })
    }

    function u(e) {
        if (!e.gd$email || !e.title)return;
        var r = {email:e.gd$email[0].address, name:e.title.$t}, s = e.link ? $.grep(e.link, function (e) {
            return e.type == "image/*"
        })[0] : null;
        s && s.gd$etag ? (r.imageUrl = s.href + "&" + $.param(window.authParams), i.pictured.push(r)) : r.name && (t.test(r.email) || n.test(r.email)) && i.personal.push(r)
    }

    function a() {
        function t(e, t) {
            return e = e.name ? e.name.toLowerCase() : e.email.toLowerCase(), t = t.name ? t.name.toLowerCase() : t.email.toLowerCase(), e > t ? 1 : -1
        }

        function n(t, n) {
            var r = $('<div class="contact"><div class="info"><b>' + n.name + '&nbsp;</b><span class="email">' + n.email + '</span></div><input type="checkbox" /></div>');
            n.imgContainer = $('<div class="img"></div>'), n.elem = r, r.prepend(n.imgContainer), r.click(function () {
                var e = r.hasClass("selected");
                r.toggleClass("selected", !e), r.find("input").attr("checked", !e), l()
            }), e.append(r)
        }

        var e = $("#import-content");
        $("#import-header").slideDown(), i.pictured.sort(t), i.personal.sort(t), $.each(i.pictured, n), $.each(i.personal, n), f(0)
    }

    function f(e) {
        if (e == i.pictured.length)return;
        var t = i.pictured[e], n = new Image;
        n.onload = function () {
            setTimeout(function () {
                f(e + 1)
            }, 100)
        }, n.src = t.imageUrl, t.imgContainer.append(n)
    }

    function l() {
        var e = $("#import-confirm"), t = $("#import-count"), n = $("#import-content .contact.selected").length;
        e.toggleClass("disabled", n == 0), t.text(n + (n == 1 ? " Friend" : " Friends"))
    }

    if ($("#import-gmail").length == 0)return;
    var e = 200, t = /@((gmail|yahoo|hotmail|aol|aim|live|me|msn)\.com|comcast.net)$/, n = /@(.*)\.edu$/, r = [], i = {pictured:[], personal:[]};
    $("#import-gmail").click(function () {
        s(!0);
        if (!window.authParams)var e = {response_type:"token", client_id:"679959213425.apps.googleusercontent.com", redirect_uri:location.protocol + "//" + location.host + "/api/google", scope:"https://www.google.com/m8/feeds", approval_prompt:"auto"}, t = window.open("https://accounts.google.com/o/oauth2/auth?" + $.param(e), "authWindow", "resizable=yes, scrollbars=no, status=no, width=640, height=430"), n = setInterval(function () {
            t.closed && !window.authParams && (clearInterval(n), s(!1))
        }, 100);
        return!1
    }), window.authCallback = function (e) {
        if (e.error)return s(!1);
        window.authParams = $.extend({}, e);
        var t = $("#import-content"), n = t.find("h1"), r = !1, i = !1;
        o(0, function () {
            i = !0, r && a()
        }), E.lib.LoadingAnimation.end(), $(".js-preloader").fadeOut("slow"), n.fadeAndReplace("Hi Google, it's Everlane.").delay(1500).fadeAndReplace("Hi Everlane! This is Google, give me just a sec...").delay(2e3).fadeOut("slow").queue(function () {
            $(this).dequeue(), t.empty(), r = !0, i && a()
        })
    }, $("#import-cancel").click(function () {
        return s(!1), !1
    }), $("#select-all").change(function () {
        var e = $("#import-controls .contact"), t = $(this).is(":checked");
        e.toggleClass("selected", t), e.find("input").attr("checked", t), l()
    }), $("#import-confirm").click(function () {
        var e = $("#import-content .contact.selected"), t = e.find(".email").map(function (e, t) {
            return $(this).text()
        }).get();
        return t.length > 0 && ($.post("/onboarding/send_invite_emails", {emails:t}), $("#onboarding-line-1").text("You've sent out " + t.length + " invitations."), $("#onboarding-line-2").text("You will be credited when they join Everlane."), new E.lib.FlashMessage("Invites Sent!"), e.fadeOut("slow", function () {
            e.remove()
        }), setTimeout(function () {
            s(!1)
        }, 1500)), !1
    })
}), E.lib.Helpers = {isMobile:function () {
    return navigator.platform.indexOf("iPhone") != -1 || navigator.platform.indexOf("iPod") != -1 || navigator.platform.indexOf("iPad") != -1 || navigator.platform.indexOf("android") != -1
}, isEmail:function (e) {
    var t = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return t.test(e)
}, inherit:function (e, t) {
    function n() {
    }

    n.prototype = t.prototype, e.superClass_ = t.prototype, e.prototype = new n, e.prototype.constructor = e
}, base:function (e, t, n) {
    var r = arguments.callee.caller;
    if (r.superClass_)return r.superClass_.constructor.apply(e, Array.prototype.slice.call(arguments, 1));
    var i = Array.prototype.slice.call(arguments, 2), s = !1;
    for (var o = e.constructor; o; o = o.superClass_ && o.superClass_.constructor)if (o.prototype[t] === r)s = !0; else if (s)return o.prototype[t].apply(e, i);
    if (e[t] === r)return e.constructor.prototype[t].apply(e, i);
    throw Error("base called from a method of one name to a method of a different name")
}, range:function (e, t, n) {
    var r = [];
    if (typeof e == "number") {
        r[0] = e, n = n || 1;
        while (e + n <= t)r[r.length] = e += n
    } else {
        var i = "abcdefghijklmnopqrstuvwxyz";
        e === e.toUpperCase() && (t = t.toUpperCase(), i = i.toUpperCase()), i = i.substring(i.indexOf(e), i.indexOf(t) + 1), r = i.split("")
    }
    return r
}}, function (e) {
    e.fn.hoverIntent = function (t, n) {
        var r = {sensitivity:7, interval:100, timeout:0};
        r = e.extend(r, n ? {over:t, out:n} : t);
        var i, s, o, u, a = function (e) {
            i = e.pageX, s = e.pageY
        }, f = function (t, n) {
            n.hoverIntent_t = clearTimeout(n.hoverIntent_t);
            if (Math.abs(o - i) + Math.abs(u - s) < r.sensitivity)return e(n).unbind("mousemove", a), n.hoverIntent_s = 1, r.over.apply(n, [t]);
            o = i, u = s, n.hoverIntent_t = setTimeout(function () {
                f(t, n)
            }, r.interval)
        }, l = function (e, t) {
            return t.hoverIntent_t = clearTimeout(t.hoverIntent_t), t.hoverIntent_s = 0, r.out.apply(t, [e])
        }, c = function (t) {
            var n = jQuery.extend({}, t), i = this;
            i.hoverIntent_t && (i.hoverIntent_t = clearTimeout(i.hoverIntent_t)), t.type == "mouseenter" ? (o = n.pageX, u = n.pageY, e(i).bind("mousemove", a), i.hoverIntent_s != 1 && (i.hoverIntent_t = setTimeout(function () {
                f(n, i)
            }, r.interval))) : (e(i).unbind("mousemove", a), i.hoverIntent_s == 1 && (i.hoverIntent_t = setTimeout(function () {
                l(n, i)
            }, r.timeout)))
        };
        return this.bind("mouseenter", c).bind("mouseleave", c)
    }
}(jQuery), LandingSlider = function (e, t, n) {
    if (E.page.LandingSlider)return E.page.LandingSlider;
    this.container = e, this.width = t, this.height = n, this.slideMaximum = this.width * this.container.find(".slides").length, $(document).on("click", "*[data-slide-to]", $.proxy(this.onTrigger, this)), this.container.find(".interest-button").bind("click", $.proxy(this.onInterested, this))
}, LandingSlider.prototype.onInterested = function (e) {
    this.slide(2, "marginLeft", !1)
}, LandingSlider.prototype.onTrigger = function (e) {
    var t = $(e.currentTarget);
    t.hasClass("login-transition") ? (this.slide(t.attr("data-slide-to"), "marginTop", !1), this.toggleBottomBar(!1)) : this.slide(t.attr("data-slide-to"), "marginLeft", !t.attr("data-prevent-switch"))
}, LandingSlider.prototype.onSubmit = function (e) {
    var t = $(e.currentTarget);
    this.transitionSlide(t.attr("data-slide-to"))
}, LandingSlider.prototype.slide = function (e, t, n) {
    n = typeof n == "boolean" ? n : !0;
    var r = this.container, i = -this.width * e;
    t === "marginTop" ? (r = $(".transition"), e == 0 ? ($("#login-transition").show(), $("#signup-transition").hide()) : e == 1 ? ($("#signup-transition").show(), $("#login-transition").hide(), e = 0) : e == 2 && (e = 1), i = -this.height * e) : t = "marginLeft";
    var s = {};
    s[t] = i, E.lib.Helpers.isMobile() ? r.css(s) : r.animate(s, 450), n && this.switchLink()
}, LandingSlider.prototype.transitionSlide = function (e) {
    var t = -this.height * e;
    E.lib.Helpers.isMobile() ? this.container.css("marginTop", t) : this.container.animate({marginTop:t}, 400)
}, LandingSlider.prototype.jump = function (e, t) {
    var t = typeof t == "boolean" ? t : !0, n = -this.width * e;
    this.container.css("marginLeft", n), t && this.switchLink()
}, LandingSlider.prototype.toggleBottomBar = function (e) {
    $(".landerNext.bottom").animate({opacity:+e}, 500)
}, LandingSlider.prototype.switchLink = function () {
    $(".apply").toggle(), $(".login").toggle()
}, E.lib.Component = function (e) {
    this.container = e
}, E.lib.Component.prototype.pub = function (e, t) {
    $(this).triggerHandler(e, t)
}, E.lib.Component.prototype.sub = function (e) {
    for (var t = 1; t < arguments.length; t++)$(this).bind(e, arguments[t])
}, E.lib.Component.prototype.get = function (e) {
    return this.ATTRS[e]
}, E.lib.Component.prototype.set = function (e, t) {
    var n = e + "_change";
    this.ATTRS[e] = t, this.pub(this.Event[n.toUpperCase()])
}, E.lib.Component.prototype.show = function () {
    var e = !this.isVisible();
    this.container.show(), e
}, E.lib.Component.prototype.hide = function () {
    var e = this.isVisible();
    this.container.hide(), e
}, E.lib.Component.prototype.setChildComponent = function (e, t) {
    this[e] = t
}, E.lib.Component.prototype.isVisible = function () {
    return this.container.is(":visible")
}, E.lib.Component.prototype.cssName = function () {
    return this.toString().replace(/\./g, "-").toLowerCase()
}, E.lib.DropDown = function (e, t, n) {
    E.lib.Component.call(this, t), this.trigger = e, this.container = t, this.activeEl = $(n);
    var r = this;
    this.container.hover($.proxy(this.show, this), $.proxy(this.hide, this)), this.container.on("mouseover", function () {
        r.isOverDropDown = !0
    }), this.container.on("mouseout", function () {
        r.isOverDropDown = !1
    }), this.trigger.hover($.proxy(this.show, this), $.proxy(this.hide, this)), this.trigger.addClass(this.TRIGGER_CLASS)
}, E.lib.Helpers.inherit(E.lib.DropDown, E.lib.Component), E.lib.DropDown.prototype.TRIGGER_CLASS = "drop-down-trigger", E.lib.DropDown.prototype.TRIGGER_ACTIVE_CLASS = "drop-down-trigger-active", E.lib.DropDown.prototype.show = function () {
    clearTimeout(this.closeTimer), this.activeEl.addClass("active"), $(".dropdown-menu").not(this.container).hide(), $("." + this.TRIGGER_ACTIVE_CLASS).not(this.trigger).removeClass(this.TRIGGER_ACTIVE_CLASS);
    var e = this.getDropdownOffset(this.trigger);
    this.trigger.addClass(this.TRIGGER_ACTIVE_CLASS), this.container.css(e).stop().css("opacity", 1).show()
}, E.lib.DropDown.prototype.hide = function () {
    var e = this;
    this.activeEl.removeClass("active"), this.closeTimer = setTimeout(function () {
        e.isOverDropDown || (e.container.fadeOut(100), e.trigger.removeClass(e.TRIGGER_ACTIVE_CLASS), e.isOverDropDown = !1)
    }, 100)
}, E.lib.DropDown.prototype.getDropdownOffset = function (e) {
    throw new Error("getDropdownOffset(): You need to override this method")
}, E.lib.DropDown.prototype.toString = function () {
    return"E.lib.DropDown"
}, E.lib.AccountDropDown = function (e, t) {
    E.lib.DropDown.call(this, e, t), this.container.css("width", this.trigger.innerWidth())
}, E.lib.Helpers.inherit(E.lib.AccountDropDown, E.lib.DropDown), E.lib.AccountDropDown.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return{left:t.left, top:t.top + 38}
}, E.lib.Alert = function (e) {
    E.lib.Component.call(this, e);
    var t = this, n = this.container.find(".close-link");
    this.disableURL = n.attr("href"), this.container.on("click", $.proxy(this.onCloseClick, this))
}, E.lib.Helpers.inherit(E.lib.Alert, E.lib.Component), E.lib.Alert.prototype.Event = {HIDE:"hide"}, E.lib.Alert.prototype.onCloseClick = function (e) {
    e.preventDefault(), this.hide()
}, E.lib.Alert.prototype.show = function () {
    this.container.removeClass("unseen")
}, E.lib.Alert.prototype.hide = function () {
    this.container.addClass("seen"), $.post(this.disableURL)
}, E.lib.Alert.prototype.toString = function () {
    return"E.lib.Alert"
}, E.lib.AlertCenter = {init:function (e) {
    var t = e.find(".alert");
    for (var n = 0; n < t.length; n++)(function (e) {
        setTimeout(function () {
            (new E.lib.Alert($(t.eq(e)))).show()
        }, e * 300)
    })(n)
}}, E.lib.ButtonSet = function (e) {
    E.lib.Component.call(this, e), this.currentButton = null, this.currentIndex_ = null, this.container.delegate("li", "click", $.proxy(this.onClick, this)), this.syncUI_()
}, E.lib.Helpers.inherit(E.lib.ButtonSet, E.lib.Component), E.lib.ButtonSet.prototype.ACTIVE_CLASS = "active", E.lib.ButtonSet.prototype.Event = {UPDATE:"update"}, E.lib.ButtonSet.prototype.ATTRS = {index:null}, E.lib.ButtonSet.prototype.syncUI_ = function () {
    this.setCurrentElement_(this.container.find("." + this.ACTIVE_CLASS))
}, E.lib.ButtonSet.prototype.onClick = function (e) {
    this.setCurrentElement_($(e.currentTarget))
}, E.lib.ButtonSet.prototype.setCurrentElement_ = function (e) {
    var t = this;
    this.ATTRS.index = this.currentIndex_ = this.container.find("li").index(e);
    if (e.is(this.currentButton))return;
    this.currentButton = e, this.container.find("li").each(function (n, r) {
        $(r).is(e) ? $(r).addClass(t.ACTIVE_CLASS) : $(r).removeClass(t.ACTIVE_CLASS)
    }), this.pub(this.Event.UPDATE, [$.extend({}, e.data(), this.ATTRS)])
}, E.lib.ButtonSet.prototype.clear = function () {
    this.currentButton && (this.container.find("li").removeClass(this.ACTIVE_CLASS), this.currentButton = null)
}, E.lib.ButtonSet.prototype.getIndex = function () {
    return this.container.children().length == 0 ? 0 : this.currentIndex_
}, E.lib.ButtonSet.prototype.toString = function () {
    return"E.lib.ButtonSet"
}, E.lib.CartManager = function () {
    if (E.lib.CartManager.instance_)return E.lib.CartManager.instance_;
    E.lib.Component.call(this), E.lib.CartManager.instance_ = this
}, E.lib.Helpers.inherit(E.lib.CartManager, E.lib.Component), E.lib.CartManager.prototype.Event = {INIT:"init", BLINK:"blink", UPDATE:"update"}, E.lib.FB = {defaultShareOptions:{method:"feed", name:"Become an Everlane member", picture:"http://static.everlane.com/static/feed-icon.jpg", display:"iframe"}, share:function (e, t) {
    var n = t || $.noop();
    FB.ui($.extend({}, this.defaultShareOptions, e), n)
}}, E.lib.FlashMessage = function (e) {
    var t = this.getContainer().html(e), n = this.getTopOffset(t), r = this.getLeftOffset(t);
    t.css({top:n, left:r}).fadeIn(600).animate({top:n - 200, opacity:0}, 600, "easeOutExpo", function () {
        t.css({opacity:1, display:"none"})
    })
}, E.flash = function (e) {
    new E.lib.FlashMessage(e)
}, E.lib.FlashMessage.prototype.getLeftOffset = function (e) {
    return($(window).width() - e.outerWidth()) / 2 + $(window).scrollLeft()
}, E.lib.FlashMessage.prototype.getTopOffset = function (e) {
    return($(window).height() - e.outerHeight()) / 2 + $(window).scrollTop()
}, E.lib.FlashMessage.prototype.makeContainer = function () {
    var e = '<div id="flash-message"></div>';
    return $(document.body).append(e), $("#flash-message")
}, E.lib.FlashMessage.prototype.getContainer = function () {
    var e = $("#flash-message");
    return e.length == 0 ? this.makeContainer() : e
}, E.lib.FlipBook = function (e, t) {
    E.lib.Component.call(this, e), this.options = t, this.canStart = !1, this.askedToStart = !1, this.intervalIDs = [], this.numberOfImages = this.options.end - this.options.start + 1, this.images = new Array(this.numberOfImages), this.currentIndex = 0, this.direction = 1, this.sub(this.Event.PRELOAD_COMPLETE, $.proxy(this.onPreloadComplete, this)), this.preloadImages()
}, E.lib.Helpers.inherit(E.lib.FlipBook, E.lib.Component), E.lib.FlipBook.prototype.Event = {TICK:"tick", LOOP:"loop", ANIMATION_START:"animation-start", ANIMATION_END:"animation-end", RESET_COMPLETE:"reset-complete", PRELOAD_COMPLETE:"preload-complete"}, E.lib.FlipBook.prototype.start = function () {
    this.askedToStart = !0, this.canStart && (this.intervalIDs.push(setInterval($.proxy(this.replaceImage, this), this.fpsToMilliseconds(this.options.fps))), this.isAnimating = !0, this.pub(this.Event.ANIMATION_START))
}, E.lib.FlipBook.prototype.pause = function () {
    for (var e = 0; e < this.intervalIDs.length; e++)clearInterval(this.intervalIDs[e])
}, E.lib.FlipBook.prototype.replaceImage = function () {
    var e = this.images[this.currentIndex];
    !this.options.loop && this.currentIndex == this.numberOfImages ? ($.each(this.intervalIDs, function (e, t) {
        clearInterval(t)
    }), this.intervalIDs = [], this.pub(this.Event.ANIMATION_END), this.currentIndex = 0) : (this.container.find("img").remove(), this.container.append($(e).show()), this.pub(this.Event.TICK, this.currentIndex / (this.numberOfImages - 1) * 100), this.currentIndex += this.direction, this.options.loop && (this.currentIndex >= this.numberOfImages - 1 || this.currentIndex <= 0) && (this.direction *= -1, this.pub(this.Event.LOOP)))
}, E.lib.FlipBook.prototype.jumpTo = function (e) {
    e = e > 100 ? 100 : e, e = e < 0 ? 0 : e, this.currentIndex = Math.floor((this.numberOfImages - 1) * e / 100), this.direction = 1, this.replaceImage()
}, E.lib.FlipBook.prototype.getImageURL = function (e) {
    return this.options.filename.replace("###", e)
}, E.lib.FlipBook.prototype.preloadImages = function () {
    var e = this, t = 0, n = 0;
    for (var r = this.options.start; r <= this.options.end; r++) {
        var i = new Image;
        i.onload = function () {
            t++, t == e.numberOfImages && e.pub(e.Event.PRELOAD_COMPLETE)
        }, i.src = this.getImageURL(r), this.images[n] = i, n++
    }
}, E.lib.FlipBook.prototype.fpsToMilliseconds = function (e) {
    return 1e3 / e
}, E.lib.FlipBook.prototype.onPreloadComplete = function (e) {
    this.canStart = !0, this.askedToStart && this.start()
}, E.lib.FlipBook.prototype.reset = function (e) {
    var t = this;
    this.container.find("img").fadeOut("slow", function () {
        t.currentIndex = 0, t.pub(t.Event.RESET_COMPLETE)
    })
}, E.lib.FlipBook.prototype.getAnimationDuration = function () {
    return this.numberOfImages * this.fpsToMilliseconds(this.options.fps)
}, E.lib.FlipBook.prototype.toString = function () {
    return"E.lib.FlipBook"
}, E.lib.FlipbookPlayer = function (e, t) {
    E.lib.Component.call(this, e);
    var n = this;
    this.options = $.extend({autoplay:!1, fps:10}, t), this.flipBook = new E.lib.FlipBook(this.container.find(".flipbook"), t), this.timeline = new E.lib.Timeline(this.container.find(".draggable-track"), this.flipBook.numberOfImages), this.currentAngle = 0, this.numberOfLoops = 0, this.left = !0, this.controls = this.container.find(".controls"), this.playbackSpinner = this.controls.find(".spinner-indicator"), this.controls.find(".spinner-play").click($.proxy(this.onPlay, this)), this.controls.find(".spinner-pause").click($.proxy(this.onPause, this)), this.flipBook.sub(this.flipBook.Event.TICK, $.proxy(this.timeline.move, this.timeline)), this.flipBook.sub(this.flipBook.Event.PRELOAD_COMPLETE, $.proxy(this.onFlipBookPreloaded, this)), this.flipBook.sub(this.flipBook.Event.RESET_COMPLETE, $.proxy(this.timeline.setHandlePosition, this.timeline)), this.timeline.sub(this.timeline.Event.DRAG, $.proxy(this.onPause, this), $.proxy(this.onDrag, this)), this.container.find(".play").bind("click", $.proxy(this.play, this)), this.options.loop ? this.flipBook.sub(this.flipBook.Event.LOOP, function () {
        n.numberOfLoops += 1, n.left = !n.left
    }) : (this.flipBook.sub(this.flipBook.Event.ANIMATION_END, $.proxy(this.onAnimationEnd, this)), this.flipBook.sub(this.flipBook.Event.RESET_COMPLETE, this.flipBook.start), this.container.find(".replay").bind("click", $.proxy(this.reset, this)))
}, E.lib.Helpers.inherit(E.lib.FlipbookPlayer, E.lib.Component), E.lib.FlipbookPlayer.prototype.play = function (e) {
    this.container.find(".play").fadeOut(), this.container.find(".title").fadeOut(), this.timeline.show(), this.controls.show(), this.startRotation(), this.flipBook.start()
}, E.lib.FlipbookPlayer.prototype.reset = function (e) {
    this.container.find(".replay").fadeOut(), this.flipBook.reset()
}, E.lib.FlipbookPlayer.prototype.onDrag = function (e, t) {
    var n = this.container.find(".play");
    n.is(":visible") && (n.fadeOut(), this.container.find(".title").fadeOut()), this.flipBook.jumpTo(t)
}, E.lib.FlipbookPlayer.
    prototype.onAnimationEnd = function (e) {
    this.container.find(".replay").css("display", "block").fadeIn()
}, E.lib.FlipbookPlayer.prototype.onFlipBookPreloaded = function (e) {
    this.container.find(".js-preloader").fadeOut(function () {
        E.lib.LoadingAnimation.destroy()
    }), this.options.autoplay && !$.cookie(this.getCookieName()) ? (this.play(), $.cookie(this.getCookieName(), 1, {expires:365})) : this.container.find(".play").show()
}, E.lib.FlipbookPlayer.prototype.getCookieName = function () {
    return this.cssName().split("-")[3] + "-ap"
}, E.lib.FlipbookPlayer.prototype.onPause = function () {
    this.flipBook.pause(), this.playbackSpinner.stopRotate(), clearInterval(this.rotationInterval), this.controls.find(".spinner-play").hasClass("hidden") && this.controls.find(".spinner-pause, .spinner-play").toggleClass("hidden")
}, E.lib.FlipbookPlayer.prototype.onPlay = function () {
    this.controls.find(".spinner-pause, .spinner-play").toggleClass("hidden"), this.play()
}, E.lib.FlipbookPlayer.prototype.startRotation = function () {
    var e = this;
    this.rotationInterval = setInterval(function () {
        e.numberOfLoops % 2 == 0 ? e.currentAngle += 3 : e.currentAngle -= 3, e.playbackSpinner.rotate(e.currentAngle)
    }, 66)
}, E.lib.FlipbookPlayer.prototype.shouldAnimateLeft = function () {
    return this.numberOfLoops % 2 == 0 ? "left" : "right"
}, E.lib.FlipbookPlayer.prototype.toString = function () {
    return"E.lib.FlipbookPlayer"
}, $(document).on("ready page:load", function () {
    $('[data-component="FlipbookPlayer"]').each(function (e, t) {
        t = $(t);
        var n = ["start", "end", "filename", "fps", "autoplay"], r = {};
        for (var i = 0; i < n.length; i++) {
            var s = n[i];
            t.data(s) && (r[s] = t.data(s))
        }
        new E.lib.FlipbookPlayer(t, r)
    })
}), E.lib.HoverCart = function (e, t, n) {
    E.lib.DropDown.call(this, e, t, n);
    var r = this;
    this.count = 0, $("body").bind("click", function (e) {
        var t = $.map($(e.target).parents(), function (e, t) {
            return $(e).attr("id")
        });
        e.target.id && t.push(e.target.id), $.inArray("cart_dropdown", t) === -1 && $.inArray("add-to-cart", t) === -1 && r.hide()
    }), this.bindUI_(), this.trigger.on("click", this.logAdRollCheckout), this.container.on("click", "#checkout-button", this.logAdRollCheckout), this.container.on("click", ".hovercart-expand", $.proxy(this.expand, this))
}, E.lib.Helpers.inherit(E.lib.HoverCart, E.lib.DropDown), E.lib.HoverCart.prototype.logAdRollCheckout = function () {
    E.page.fixedNavigation || $.adroll.checkout()
}, E.lib.HoverCart.prototype.bindUI_ = function () {
    var e = E.lib.CartManager.instance_;
    e.sub(e.Event.UPDATE, $.proxy(this.update, this)), e.sub(e.Event.BLINK, $.proxy(this.fadeInFadeOut, this)), e.sub(e.Event.INIT, $.proxy(this.init, this))
}, E.lib.HoverCart.prototype.init = function (e, t) {
    this.count = t, $({}).EverlaneChibicart().init(t)
}, E.lib.HoverCart.prototype.show = function () {
    E.hideHoverCart || E.lib.Helpers.base(this, "show")
}, E.lib.HoverCart.prototype.expand = function () {
    this.container.find(".update-old").show(), this.container.find(".hovercart-expand").hide()
}, E.lib.HoverCart.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return this.container.css("position", "absolute"), {top:t.top + 38, left:t.left - (this.container.width() - 120)}
}, E.lib.HoverCart.prototype.fadeInFadeOut = function () {
    var e = this;
    this.show(), this.closeTimer = setTimeout(function () {
        e.isOverDropDown || (e.container.fadeOut(1e3, function () {
            e.showLink && e.showLink()
        }), e.trigger.removeClass(e.TRIGGER_ACTIVE_CLASS))
    }, 3e3)
}, E.lib.HoverCart.prototype.setCount = function (e) {
    this.count = e, $({}).EverlaneChibicart().setCount(e)
}, E.lib.HoverCart.prototype.update = function (e, t) {
    var n;
    t.hasOwnProperty("authoritative") ? n = t.authoritative : n = this.count + t.increment, this.setCount(n)
}, E.lib.ImageLoader = {loadImages:function (e) {
    for (var t = 0, n = e.length; t < n; t++)this.loadImage(e[t])
}, loadImage:function (e) {
    e && ((new Image).src = e)
}}, function () {
    var e;
    e = jQuery, e.fn.extend({hoverZoom:function (t) {
        var n, r, i, s, o, u, a;
        return a = {boxParent:this.parent(), zoomParent:"body", boxCSS:{opacity:.4, backgroundColor:"white", border:"1px solid #ccc", cursor:"move"}, sensitivity:30, delay:75, idealScale:2.66, scaleThreshold:{width:3, height:3}, minSize:{width:800, height:800}, "in":function (e) {
        }, out:function (e) {
        }}, a = e.extend(a, t), r = this, s = [0, 0], i = [0, 0], u = [1, 1], o = !1, n = function (e, t) {
            var n;
            return n = PageConfig.gallery_hash.products[e].images[t], n.original_size || ""
        }, this.each(function () {
            return r.on("mousemove", function (e) {
                return s = [e.pageX, e.pageY]
            }), r.on("mouseover", function (t) {
                return e("<img/>").attr("src", n(r.data("product-index"), r.data("index"))).load(function () {
                    return i = [this.width, this.height]
                })
            }), r.hoverIntent({sensitivity:a.sensitivity, interval:a.delay, over:function (t) {
                var f, l, c, h, p, d;
                u = [i[0] / r.width(), i[1] / r.height()], u[0] > a.scaleThreshold.width || u[1] > a.scaleThreshold.height ? o = !0 : o = !1, f = [0, 0];
                if (!(i[0] < a.minSize.width || i[1] < a.minSize.height))return h = e("#mousebox").length > 0 ? e("#mousebox") : e('<div id="mousebox"></div>'), l = e("#hover-image").length > 0 ? e("#hover-image") : e('<div id="hover-image"></div>'), h.css({border:a.boxCSS.border, cursor:a.boxCSS.cursor, backgroundColor:a.boxCSS.backgroundColor, opacity:a.boxCSS.opacity}), o ? h.css({width:Math.round(r.width() / a.idealScale), height:Math.round(r.height() / a.idealScale)}) : h.css({width:r.width() / u[0], height:r.height() / u[1]}), p = s[0] - r.offset().left - h.width() / 2, d = s[1] - r.offset().top - h.height() / 2, p <= 0 && (p = 0), p >= r.width() - h.width() && (p = r.width() - h.width()), d <= 0 && (d = 0), d >= r.height() - h.height() && (d = r.height() - h.height()), o ? (f[0] = p * a.idealScale, f[1] = d * a.idealScale, c = Math.floor(100 * a.idealScale), l.css("background-size", "" + c + "% " + c + "%")) : (f[0] = p * u[0], f[1] = d * u[1]), h.css({top:Math.round(d), left:Math.round(p)}), l.css({"background-image":"url(" + n(r.data("product-index"), r.data("index")) + ")", "background-position":"-" + f[0] + "px -" + f[1] + "px", width:r.width(), height:r.height()}), h.hide().appendTo(a.boxParent).fadeIn(300), l.hide().prependTo(a.zoomParent).fadeIn(300), a["in"](t)
            }, out:function (e) {
            }}), a.boxParent.on("mouseleave", r, function (t) {
                return e("#mousebox").fadeOut(300, function () {
                    return e(this).remove()
                }), e("#hover-image").fadeOut(300, function () {
                    return e(this).remove()
                }), a.out(t)
            }), a.boxParent.on("mousemove", r, function (t) {
                var n, s, f, l, c, h;
                return f = e("#hover-image").length > 0 ? e("#hover-image") : e('<div id="hover-image"></div>'), l = e("#mousebox").length > 0 ? e("#mousebox") : e('<div id="mousebox"></div>'), c = [l.offset().left - r.offset().left, l.offset().top - r.offset().top], s = [t.pageX - l.offset().left - l.width() / 2, t.pageY - l.offset().top - l.height() / 2], h = [c[0] + s[0], c[1] + s[1]], n = [0, 0], h[0] <= 0 && (h[0] = 0), h[0] >= r.width() - l.width() && (h[0] = r.width() - l.width() - 2), h[1] <= 0 && (h[1] = 0), h[1] >= r.height() - l.height() && (h[1] = r.height() - l.height() - 2), o ? (n[0] = (t.pageX - r.offset().left - l.width() / 2) * a.idealScale, n[1] = (t.pageY - r.offset().top - l.height() / 2) * a.idealScale, n[0] > r.width() * a.idealScale - r.width() && (n[0] = r.width() * a.idealScale - r.width()), n[1] > r.height() * a.idealScale - r.height() && (n[1] = r.height() * a.idealScale - r.height())) : (n[0] = (t.pageX - r.offset().left - l.width() / 2) * u[0], n[1] = (t.pageY - r.offset().top - l.height() / 2) * u[1]), n[0] < 0 && (n[0] = 0), n[0] > i[0] - r.width() && (n[0] = i[0] - r.width()), n[1] < 0 && (n[1] = 0), n[1] > i[1] - r.height() && (n[1] = i[1] - r.height()), l.css({top:Math.round(h[1]), left:Math.round(h[0])}), f.css("background-position", "-" + n[0] + "px -" + n[1] + "px")
            })
        })
    }})
}.call(this), function () {
    function t() {
        var t = e.length, n = e.eq(E.page.preloaderI), r = 250, i = .5;
        E.page.preloaderI == t - 1 && (E.page.preloaderI = -1), n.fadeTo(r, 1, function () {
            n.fadeTo(r, i)
        }), E.page.preloaderI += 1
    }

    var e;
    E.lib.LoadingAnimation = {begin:function () {
        E.page.preloaderI = 0, e = $(".js-preloader li"), e.length > 0 && (E.page.preloaderInterval = setInterval(t, 600))
    }, end:function () {
        clearInterval(E.page.preloaderInterval)
    }, destroy:function () {
        this.end(), $(".js-preloader").remove()
    }}, $(function () {
        E.lib.LoadingAnimation.begin()
    })
}(), E.lib.MinimalCart = function (e, t, n) {
    E.lib.HoverCart.call(this, e, t, n), this.countDisplay = this.trigger.find("#bag-link")
}, E.lib.Helpers.inherit(E.lib.MinimalCart, E.lib.HoverCart), E.lib.MinimalCart.prototype.logAdRollCheckout = function () {
    E.page.fixedNavigation && $.adroll.checkout()
}, E.lib.MinimalCart.prototype.initialize = function (e) {
    this.count = e, this.countDisplay.html("Bag (" + e + ")")
}, E.lib.MinimalCart.prototype.setCount = function (e) {
    this.count = e, this.countDisplay.html("Bag (" + e + ")")
}, E.lib.MinimalCart.prototype.showLink = function () {
}, E.lib.MinimalCart.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return this.container.css("position", "absolute"), {top:t.top + 40, left:t.left - (this.container.width() - 120)}
}, E.lib.PopupAppointmentDropDown = function (e, t) {
    E.lib.DropDown.call(this, e, t), this.container.bind("click", $.proxy(this.onChildClick, this))
}, E.lib.Helpers.inherit(E.lib.PopupAppointmentDropDown, E.lib.DropDown), E.lib.PopupAppointmentDropDown.prototype.onChildClick = function (e) {
    this.container.hide(), this.trigger.removeClass(this.TRIGGER_ACTIVE_CLASS)
}, E.lib.PopupAppointmentDropDown.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return{left:t.left, top:t.top + e.outerHeight()}
}, E.lib.ShopDropDown = function (e, t, n) {
    E.lib.DropDown.call(this, e, t, n), this.bindUI_(), this.syncUI_()
}, E.lib.Helpers.inherit(E.lib.ShopDropDown, E.lib.DropDown), E.lib.ShopDropDown.prototype.Event = {MENU_ITEM_CLICK:"menu_item_clicked"}, E.lib.ShopDropDown.prototype.bindUI_ = function () {
    this.container.delegate(".product-links a", "mouseover", $.proxy(this.onLinkOver, this)), this.container.delegate("a", "click", $.proxy(this.onLinkClick, this))
}, E.lib.ShopDropDown.prototype.syncUI_ = function () {
    var e = window.location.href.toLowerCase();
    e.charAt(e.length - 1) != "/" && (e += "/"), this.container.find("a").each(function (t, n) {
        var r = n.href.toLowerCase();
        r.charAt(r.length - 1) != "/" && (r += "/"), r == e && $(n).addClass("active")
    })
}, E.lib.ShopDropDown.prototype.onLinkOver = function (e) {
    var t = $(e.currentTarget).attr("data-link-for");
    this.container.find(".product-spotlights").find("li").each(function (e, n) {
        $(n).attr("data-spotlight-for") !== t ? $(n).addClass("hidden") : $(n).removeClass("hidden")
    })
}, E.lib.ShopDropDown.prototype.onLinkClick = function (e) {
    return this.pub(this.Event.MENU_ITEM_CLICK, [
        {href:$(e.currentTarget).attr("href").trim().split("/").pop()}
    ]), !0
}, E.lib.ShopDropDown.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return{top:t.top + 45, left:t.left - 177}
}, E.lib.ShopDropDown.prototype.toString = function () {
    return"E.lib.ShopDropDown"
}, E.lib.Slider = function (e, t) {
    this.container = e;
    var n = this, r = {play:6e3, effect:"slide", fadeEasing:"easeInOutQuad", slideEasing:"easeInOutQuad", fadeSpeed:500, slideSpeed:500, hoverPause:!1, generatePagination:!1, generateNextPrev:!1}, i = $.extend({}, r, t || {});
    this.container.slides(i), this.container.find(".slides-arrow.prev").delay(750).animate({left:0}, 750), this.container.find(".slides-arrow.next").delay(1e3).animate({right:0}, 750), $(document.body).bind("keyup", $.proxy(this.onKeyup, this))
}, E.lib.Slider.prototype.onKeyup = function (e) {
    if ($(".slides_control").length > 1)return;
    e.which === 37 ? $(".slides-arrow.prev").trigger("click") : e.which === 39 && $(".slides-arrow.next").trigger("click")
}, E.lib.StatusMessage = function () {
    return this.container = $(".status-message"), this.hasError = !1, this
}, E.lib.StatusMessage.prototype.show = function (e) {
    statusMessage.data("has-error") ? statusMessage.effect("highlight", 750) : statusMessage.fadeIn().effect("highlight", {}, 1500).data("has-error", !0)
}, E.lib.StatusMessage.prototype.show_ = function (e) {
    this.container.fadeIn().effect("highlight", {}, 1500), this.hasError = !0
}, E.lib.StatusMessage.prototype.flash = function () {
    statusMessage.effect("highlight", 750)
}, E.lib.StatusMessage.prototype.update = function () {
    statusMessage.effect("highlight", 750)
}, E.lib.StickyMinimalCart = function (e, t, n) {
    E.lib.MinimalCart.call(this, e, t, n), this.container.css("position", "fixed"), this.countDisplay = this.trigger
}, E.lib.Helpers.inherit(E.lib.StickyMinimalCart, E.lib.MinimalCart), E.lib.StickyMinimalCart.prototype.show = function () {
    E.page.fixedNavigation && (E.lib.Helpers.base(this, "show"), this.container.css("position", "fixed"))
}, E.lib.StickyMinimalCart.prototype.hide = function () {
    E.page.fixedNavigation && E.lib.Helpers.base(this, "hide")
}, E.lib.StickyMinimalCart.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return{top:43, left:t.left - (this.container.width() - 120)}
}, E.lib.StickyShopDropDown = function (e, t) {
    E.lib.ShopDropDown.call(this, e, t, "#fixed-navigation"), this.container.css("position", "fixed")
}, E.lib.Helpers.inherit(E.lib.StickyShopDropDown, E.lib.ShopDropDown), E.lib.StickyShopDropDown.prototype.getDropdownOffset = function (e) {
    var t = e.offset();
    return{top:40, left:t.left - 177}
}, E.lib.StickyShopDropDown.prototype.toString = function () {
    return"E.lib.StickyShopDropDown"
}, E.lib.Timeline = function (e, t) {
    E.lib.Component.call(this, e), this.numFrames = t, this.dragging = !1;
    var n = this;
    $(document).mousemove(function (e) {
        if (e.which != 1 || !n.dragging)return;
        n.moveToMouseEvent(e)
    }), this.container.mousedown(function (e) {
        $(document).disableSelection(), n.dragging = !0, n.moveToMouseEvent(e)
    }), $(document).mouseup(function () {
        $(document).enableSelection(), n.dragging = !1
    })
}, E.lib.Helpers.inherit(E.lib.Timeline, E.lib.Component), E.lib.Timeline.prototype.Event = {DRAG:"drag"}, E.lib.Timeline.prototype.moveToMouseEvent = function (e) {
    var t = this.container.width(), n = this.container.offset(), r = e.pageX - n.left, i = Math.floor(r / t * 100), i = this.capPercentage(i);
    this.pub(this.Event.DRAG, [i]), this.setHandlePosition(i)
}, E.lib.Timeline.prototype.move = function (e, t) {
    t = this.capPercentage(t), this.setHandlePosition(t)
}, E.lib.Timeline.prototype.setHandlePosition = function (e) {
    this.container.find("span").css("left", e + "%")
}, E.lib.Timeline.prototype.capPercentage = function (e) {
    return e < 0 ? 0 : e > 100 ? 100 : e
}, E.lib.Timeline.prototype.toString = function () {
    return"E.lib.Timeline"
}, E.lib.TweetWall = function (e, t) {
    var n = {count:6, fromExistingDom:!1, callback:this.show};
    this.container = e, this.config = $.extend({}, n, t), this.config.callback = $.proxy(this.config.callback, this), this.container.addClass("tweet-wall")
}, E.lib.TweetWall.prototype.fetch = function () {
    this.container.EverlaneTwitter(this.config)
}, E.lib.TweetWall.prototype.show = function () {
    var e = this;
    this.tweets = this.container.find("li");
    for (var t = 0; this.tweets.length > t; t++)(function (t) {
        setTimeout(function () {
            e.showTweet(e.tweets.eq(t))
        }, t * 125)
    })(t)
}, E.lib.TweetWall.prototype.showTweet = function (e) {
    e.removeClass("hide")
}, E.lib.VimeoVideo = function (e, t) {
    E.lib.Component.call(this, e), this.options = t || {}, this.track("initialized"), E.lib.VimeoVideo.apiLoaded || $.getScript("https://secure-a.vimeocdn.com/js/froogaloop2.min.js", $.proxy(this.onAPILoaded, this))
}, E.inherit(E.lib.VimeoVideo, E.lib.Component), E.lib.VimeoVideo.apiLoaded = !1, $.extend(E.lib.VimeoVideo.prototype, {Event:{FINISH:"finish"}, bufferVideo:function () {
    if (!E.lib.Helpers.isMobile()) {
        var e = this;
        this.player.api("volume", 0), this.player.api("play"), this.player.addEvent("playProgress", function (t) {
            !e.videoBuffered && t.seconds > 0 && (e.player.api("pause"), e.player.api("volume", 1), e.videoBuffered = !0)
        })
    }
}, play:function () {
    E.lib.Helpers.isMobile() ? (this.makePlayer(), this.player.api("play")) : (this.player.api("play"), this.videoBuffered = !0), this.track("play")
}, pause:function () {
    this.player.api("pause"), this.track("pause")
}, onAPILoaded:function () {
    E.lib.VimeoVideo.apiLoaded = !0, this.makePlayer(), this.player.addEvent("ready", $.proxy(this.onVideoReady, this))
}, makePlayer:function () {
    var e = this.container[0];
    this.player = $f(e)
}, onVideoReady:function () {
    this.bufferVideo(), this.player.addEvent("finish", $.proxy(this.onFinish, this))
}, onFinish:function () {
    this.pub(this.Event.FINISH), this.track("finished")
}, track:function (e) {
    this.options.title && $.track(this.options.title + ": " + e)
}, toString:function () {
    return"E.lib.VimeoVideo"
}}), $(document).on("ready", function () {
    $('[data-component="VimeoVideo"]').each(function (e, t) {
        t = $(t);
        var n = t.find(".video-overlay"), r = t.find(".close-link"), i = new E.lib.VimeoVideo(t.find("iframe")), s = t.data("default-height");
        n.click(function () {
            s && t.animate({height:t.data("true-height")}), n.fadeOut(300, "easeOutQuad", function () {
                i.play(), r.show()
            })
        }), r.click(function () {
            r.hide(), i.pause(), s && t.animate({height:s}), n.fadeIn(300, "easeInQuad")
        })
    })
}), E.pages.collection.Controller = {init:function (e) {
    for (param in e)e[param] && e.hasOwnProperty(param) && this[param]();
    $(".product-image-container").EverlaneCollectionImage()
}, initSlider:function () {
    new E.lib.Slider($("#slides-widget"))
}, initOxfordBannerLogging:function () {
    $.track("oxford banner viewed"), $(".ab-oxford-banner").on("click", function () {
        $.track("oxford banner clicked")
    })
}}, function () {
    $(function () {
        var e, t, n, r;
        if ($("#credit_card_form").length === 0)return;
        return $(".ignorefield").removeProp("name"), $(".cc_number").on("change keyup", function () {
            var e;
            return(e = $.payment.cardType($(this).val())) ? $("#cc_icons").css("opacity", 1).removeClass().addClass(e) : $("#cc_icons").css("opacity", 0)
        }), $(".country").on("change",function () {
            return $(".zip-code-container").toggle($(this).val() === "USA"), $(".zip_code").prop("readonly", $(this).val() !== "USA")
        }).change(), $("#credit_card_form").submit(function () {
            var e, t, n, r, i, s, o, u, a, f, l, c;
            o = {}, $(".error_explanation").hide().empty(), $(this).find(".field.error").removeClass("error"), e = function (e, t) {
                var n;
                return n = $("label[for='" + e.attr("id") + "']"), o[e.attr("id")] = {field:e.parent(), message:n.contents()[0].textContent.trim() + " " + t}
            }, r = $(".cc_number"), t = $(".cc_cvv"), n = $(".cc_expiry"), c = $(".zip_code"), a = $(".full_name"), u = n.payment("cardExpiryVal"), l = NameParse.parse(a.val()), l.firstName || (l.firstName = l.initials), l.firstName || e(a, "is incomplete"), $.payment.validateCardNumber(r.val()) || e(r, "is invalid"), $.payment.validateCardCVC(t.val(), $.payment.cardType(r.val())) || e(t, "is invalid"), $.payment.validateCardExpiry(u) || e(n, "is invalid"), $(this).find(".required").each(function () {
                if ($(this).val().length === 0)return e($(this), "is required")
            }), $(this).find(".country").val() === "USA" && c.val().length !== 5 && e(c, "is required for US credit cards");
            if (!$.isEmptyObject(o)) {
                s = $("<ul/>");
                for (f in o)i = o[f], s.append($("<li>" + i.message + "</li>")), i.field.addClass("error");
                return $(".error_explanation").append(s).show(), !1
            }
            return $(".first_name").val(l.firstName), $(".last_name").val(l.lastName), $(".cc_number_hidden").val(r.val().replace(/\s/g, "")), $(".cc_expiry_hidden").val("" + u.month + "/" + u.year), !0
        }), $(".cc_number").payment("formatCardNumber").change(), $(".cc_cvv").payment("formatCardCVC").change(), $(".cc_expiry").payment("formatCardExpiry").change(), $(".zip_code").payment("restrictNumeric"), e = "", t = [], r = "~CARD~", n = !1, $(window.parent || document).keypress(function (t) {
            var i;
            i = String.fromCharCode(t.which);
            if (!!n)return e += i;
            e += i, e = e.substr(-r.length);
            if (e === r)return n = !0, e = ""
        }), $(window.parent || document).keydown(function (r) {
            if (n)if (r.which === 9 || r.which === 13)return t.push(e), e = "", r.which === 13 && (n = !1, $(".cc_number").val(t[0]).change(), $(".cc_expiry").val(t[2] + "/" + t[3]).change(), t = []), r.preventDefault(), !1
        })
    })
}.call(this), E.pages.map.Controller = {viewedFactories:[], currentFactory:null, historyChanged:!1, validPaths:["el-paso-usa", "dongguan-china", "elgin-scottland", "los-angeles-usa", "san-francisco-usa", "hangzhou-china"], init:function () {
    var e = this, t = $.grep(window.location.pathname.split("/"), function (e, t) {
        return!!e
    }), n = t.pop();
    if (this.validPaths.indexOf(n) !== -1) {
        var r = $('section[data-factory="' + n + '"]');
        this.currentFactory = r, this.showFactory()
    }
    $(".tooltip").tipTip({delay:0}), $(".map-marker").each(function (e, t) {
        setTimeout(function () {
            $(t).addClass("marker-animation")
        }, Math.ceil(Math.random() * 1e3))
    }), $(window).keydown(function (t) {
        t.keyCode == 27 && e.closeFactorySection()
    }), $("section").on("click", ".close", $.proxy(this.closeFactorySection, this)), $(window).on("popstate", function (t) {
        return e.historyChanged && e.closeFactorySection(), !1
    }), $(".map-display").on("click", ".map-marker", $.proxy(this.onMakerClick, this))
}, onMakerClick:function (e) {
    e.preventDefault();
    var t = $(e.currentTarget), n = t.data("factory");
    $("#map-mock").hide(), this.currentFactory = $('section[data-factory="' + n + '"]'), t.tipTip("hide"), $("#footer").css("margin-top", $("#footer").outerHeight()), this.showFactory(), this.changeHistory(t.attr("href"))
}, changeHistory:function (e) {
    e ? (history.pushState(null, "", e), this.historyChanged = !0) : history.pushState(null, "Map", "/map")
}, showFactory:function () {
    this.currentFactory.css("display", "block").addClass("visible"), $.inArray(this.currentFactory.data("factory"), this.viewedFactories) === -1 ? this.buildFactory() : this.currentFactory.css("opacity", 1)
}, buildFactory:function () {
    var e = this, t = this.currentFactory, n = t.find(".content-container"), r = t.find(".factory-header").find(".title"), i = r.html().replace(/^\s+|\s+$/g, "").split("");
    i = jQuery.map(i, function (e) {
        if (e)return'<em style="font-style: normal; opacity: 0;">' + e + "</em>"
    }), t.find(".factory-header").find(".title").css("opacity", 1).html(i.join("")).find("em").each(function (e, t) {
        $(t).delay(e * 50).animate({opacity:1}, 900, "easeOutQuart")
    }), t.find(".hero").delay(i.length * 50).animate({opacity:1}, 1200, "easeOutQuart", function () {
        var r = n.find("p").first().offset().top + 30, i = $(window).height();
        r > i && n.delay(300).animate({top:-(r - i)}, 1200, "easeOutQuart"), n.find(".holder").delay(300).animate({opacity:1}, 1200, "easeOutQuart", function () {
            e.viewedFactories.push(t.data("factory"))
        })
    })
}, closeFactorySection:function () {
    this.currentFactory.animate({opacity:0}, 600, "easeOutQuad").css("display", "none"), $("#map-mock").show(), this.changeHistory(), this.currentFactory = null
}}, E.pages.product.BuckleShim = function () {
    this.elements = {buckleOptions:$(".buckle-option"), cart:$("#cart_form")}, $(".product-options").delegate(".buckle-option", "click", $.proxy(this.onBuckleClick, this)), this.photoOrder = ["none", "silver", "antique brass", "black"], this.elements.cart.append($("<input />", {type:"hidden", id:"buckle-data", name:"buckle_data", value:0}))
}, E.pages.product.BuckleShim.prototype.onBuckleClick = function (e) {
    var t = this, n = $("#prices-container"), r = n.find(".prices-window"), i = $(e.currentTarget), s = n.hasClass("has-equation") ? -115 : -44, o = i.data("variant-id");
    if (i.hasClass("sold-out"))return!1;
    r.animate({top:o == null ? s : -8}, 300, function () {
        o == null && r.effect("highlight", {}, 1e3)
    }), i.addClass("active"), this.elements.buckleOptions.not(i).removeClass("active"), this.appendBucklePostData(o);
    var u = $(".product-thumbs").find("img");
    u.eq(o == null ? 0 : this.elements.buckleOptions.index(i) + 1).trigger("click")
}, E.pages.product.BuckleShim.prototype.appendBucklePostData = function (e) {
    $("#buckle-data").attr("value", e)
}, E.pages.product.Controller = {init:function (e) {
    this.productSelector = new E.pages.product.ProductSelector($(".color-selector")), this.sizeSelector = new E.pages.product.SizeSelector($(".size-selector")), this.imageSelector = new E.pages.product.ImageSelector($(".product-thumbs")), this.form = new E.pages.product.Form($("#cart_form")), this.image = new E.pages.product.Image($(".product-photo")), this.image.setChildComponent("productSelector", this.productSelector), this.form.setChildComponent("sizeSelector", this.sizeSelector), this.form.setChildComponent("productSelector", this.productSelector), this.productSelector.sub(this.productSelector.Event.UPDATE, $.proxy(this.imageSelector.updateProduct, this.imageSelector), $.proxy(this.sizeSelector.update, this.sizeSelector), $.proxy(this.form.updateSubmitButton, this.form)), this.sizeSelector.sub(this.sizeSelector.Event.UPDATE, $.proxy(this.form.updateSubmitButton, this.form)), this.imageSelector.sub(this.imageSelector.Event.UPDATE, $.proxy(this.image.update, this.image)), $.each(PageConfig.gallery_hash.products, function (e, t) {
        $.each(t.variants, function (e, t) {
            t.orderable_state == "sold_out" && $.inArray(t.id, PageConfig.waitlisted_variants) != -1 && (t.orderable_state = "waitlisted")
        })
    });
    for (param in e)e[param] && e.hasOwnProperty(param) && this[param]();
    this.form.updateSubmitButton(), $(window).load(this.preloadImages)
}, initBuckleSelector:function () {
    new E.pages.product.BuckleShim
}, initTweets:function () {
    $(".product-tweets").EverlaneTwitter({handle:PageConfig.twitter_handle, callback:function (e) {
        E.page.fader = function (e) {
            var t = $(".product-tweet"), n = t.length, r = t.eq(e), i = 700, s = 0;
            e == n - 1 && (e = -1), E.page.hasNewTweetTransition ? (r.removeClass("hide"), setTimeout(function () {
                r.addClass("hide"), E.page.fader(e + 1)
            }, 8e3)) : r.fadeIn(i, function () {
                r.delay(5e3).fadeOut(i, function () {
                    E.page.fader(e + 1)
                })
            })
        }, E.page.fader(0)
    }})
}, initVideo:function () {
    if (!!document.createElement("video").canPlayType) {
        var e = PageConfig.gallery_hash.products[0].images, t = e.length;
        $.each(PageConfig.gallery_hash.products, function (e, n) {
            PageConfig.gallery_hash.products[e].images[t] = {isVideo:!0}
        })
    }
}, initOxfordBannerLogging:function () {
    $.track("oxford banner viewed"), $(".ab-oxford-banner").on("click", function () {
        $.track("oxford banner clicked")
    })
}, preloadImages:function () {
    var e = [];
    $.each(PageConfig.gallery_hash.products, function (t, n) {
        $.each(n.images, function (t, n) {
            e.push(n.url, n.thumb, n.original_size)
        })
    }), E.lib.ImageLoader.loadImages(e)
}}, E.pages.product.Form = function (e) {
    E.lib.Component.call(this, e), this.button = this.container.find(".add-to-cart"), this.quantityField = this.container.find("#quantity"), this.errorField = this.container.find("#cart_error"), this.preorderInfo = this.container.find("#preorder-info"), this.buckleField = this.container.find("#buckle-data"), this.container.bind("submit", $.proxy(this.onSubmit, this))
}, E.lib.Helpers.inherit(E.pages.product.Form, E.lib.ButtonSet), E.pages.product.Form.prototype.Types = {sold_out:{value:"Sold Out", disabled:!0}, waitlistable:{value:"Notify Me", disabled:!1}, shippable:{value:"Add to Bag", disabled:!1}, preorderable:{value:"Pre-order", disabled:!1}, waitlisted:{value:"Waitlisted", disabled:!0}}, E.pages.product.Form.prototype.onSubmit = function (e) {
    this.rollbackErrors();
    if (!this.validate())return!1;
    this.populate()
}, E.pages.product.Form.prototype.populate = function () {
    var e = PageConfig.gallery_hash.products[this.productSelector.getIndex()], t = e.variants[this.sizeSelector.getIndex()], n = t.orderable_state == "sold_out";
    this.container.find("#product-id").val(e.id), this.container.find("#variant-id").val(t.id), this.container.find("#sold_out").val(n), n || this.fakeLineItemAdd(e, t)
}, E.pages.product.Form.prototype.validate = function () {
    if (this.sizeSelector.getIndex() < 0)this.showError("Please select a size", this.sizeSelector.container); else if (this.quantityField.val() <= 0)this.showError("Please select a quantity.", $(".quantity-selector")); else {
        if (!(this.buckleField.length > 0) || this.buckleField.val() != 0 && this.buckleField.val() != "false")return!0;
        this.showError("Please select a buckle option.", $("#buckle-selector"))
    }
    return!1
}, E.pages.product.Form.prototype.showError = function (e, t) {
    this.errorField.text(e), t && t.effect("shake", {distance:5, times:3}, 200).find("label").addClass("error")
}, E.pages.product.Form.prototype.rollbackErrors = function () {
    this.errorField.text(""), this.container.find("label").removeClass("error")
}, E.pages.product.Form.prototype.showPreorderDate = function (e) {
    $("#cart_error").hide(), this.preorderInfo.text("Ships on " + e).show().animate({top:10}, 300, "easeOutBack")
}, E.pages.product.Form.prototype.hidePreorderDate = function () {
    this.preorderInfo.animate({top:-25}, 300, "easeInBack")
}, E.pages.product.Form.prototype.updateSubmitButton = function (e, t) {
    if (!E.isLoggedIn)return;
    var n, r = PageConfig.gallery_hash.products[this.productSelector.getIndex()], i = r.variants[this.sizeSelector.getIndex()];
    this.sizeSelector.getIndex() < 0 ? n = r.orderable_state : r.waitlistable && i.orderable_state === "sold_out" ? n = "waitlistable" : n = i.orderable_state, this.sizeSelector.getIndex() >= 0 && n === "preorderable" ? this.showPreorderDate(i.restock_date) : this.hidePreorderDate(), this.button.attr(this.Types[n]).removeClass(E.object.keys(this.Types).join(" ")).addClass(n)
}, E.pages.product.Form.prototype.fakeLineItemAdd = function (e, t) {
    if (this.container.find("#buckle-data").length > 0) {
        E.page.skippingFadeIn = !0;
        return
    }
    E.page.skippingFadeIn = !1;
    var n = parseInt(this.quantityField.val()), r = e.display_name, i = $("#preorder-info");
    i = i.is(":visible") ? $.trim(i.text()) : "";
    var s = $(".product-thumbs").find("img").first(), o = E.page.transparentPricing ? e.price : e.base_price, u = parseFloat(o * n);
    u != Math.floor(u) && (u = u.toFixed(2)), E.page.Cart.pub(E.page.Cart.Event.UPDATE, [
        {increment:n}
    ]);
    var a = $("#cart-" + t.sku);
    a.length > 0 && (n += parseInt($.trim(a.find(".quantity").first().text())), a.remove());
    var f = $(['<li class="hovercart-item" id="cart-', t.sku, '">', '<div class="line-item-info-container clearfix">', "<h4><a>", r, "</a></h4>", '<div class="size">', t.size, "</div>", i ? '<div class="size">' + i + "</div>" : "", '<div class="line-item-info clearfix">', '<div class="line-item-title">', "Quantity", "</div>", '<div class="line-item-value quantity">', n, "</div>", "</div>", '<div class="line-item-info clearfix">', '<div class="line-item-title">', "Total", "</div>", '<div class="line-item-value">', "$", u, "</div>", "</div>", "</div>", "</li>"].join(""));
    f.prepend(s.clone().css("height", 100).css("width", 100));
    var l = $(".hovercart-list");
    l.find(".hovercart-undo, p").hide();
    var c = l.find("li");
    c.length > 1 && (c.hide(), c.first().show()), l.prepend(f), $("#checkout-button").show(), setTimeout(function () {
        E.page.Cart.pub(E.page.Cart.Event.BLINK)
    }, 500)
}, E.pages.product.Image = function (e) {
    e.find("img").data("index", 0).data("product-index", PageConfig.product_index), E.lib.Component.call(this, e)
}, E.lib.Helpers.inherit(E.pages.product.Image, E.lib.Component), E.pages.product.Image.prototype.update = function (e, t) {
    var n = t.index, r = this.productSelector.getIndex(), i = PageConfig.gallery_hash.products[r].images[n], s = null;
    $("#main-video").length !== 0 && (s = $("#main-video")[0]);
    if (i.isVideo)$("#main-video").show(), s.play(); else {
        s && (s.pause(), $("#main-video").hide(), s.currentTime && (s.currentTime = 0));
        var o = PageConfig.gallery_hash.products[r].images[n].url;
        this.container.find("img").data("index", n).data("product-index", r).attr("src", o)
    }
}, E.pages.product.ImageSelector = function (e) {
    E.lib.ButtonSet.call(this, e)
}, E.lib.Helpers.inherit(E.pages.product.ImageSelector, E.lib.ButtonSet), E.pages.product.ImageSelector.prototype.updateProduct = function (e, t) {
    var n = t.index, r = PageConfig.gallery_hash.products[n].images;
    $("#primary-image").attr("src", r[0].url).data("product-index", n).data("index", 0), this.container.find("li img").each(function (e, t) {
        $(t).attr("src", r[e].thumb)
    }), this.clear()
}, E.pages.product.ProductSelector = function (e) {
    E.lib.ButtonSet.call(this, e), this.sub(this.Event.UPDATE, $.proxy(this.update, this))
}, E.lib.Helpers.inherit(E.pages.product.ProductSelector, E.lib.ButtonSet), E.pages.product.ProductSelector.prototype.update = function (e, t) {
    var n = PageConfig.gallery_hash.products[t.index];
    this.container.find("label").find("span").text(n.color);
    if ($.isFunction(window.history.replaceState)) {
        var r = window.location.pathname;
        r = r.replace(/\/[^\/]*$/, "/" + n.permalink);
        var i = n.display_name + " - Everlane";
        document.title = i, window.history.replaceState({}, i, r)
    }
}, E.pages.product.SizeSelector = function (e) {
    E.lib.ButtonSet.call(this, e)
}, E.lib.Helpers.inherit(E.pages.product.SizeSelector, E.lib.ButtonSet), E.pages.product.SizeSelector.prototype.update = function (e, t) {
    var n = this, r = t.index, i = PageConfig.gallery_hash.products[r], s = 0;
    $.each(i.variants, function (e, t) {
        var r = t.orderable_state === "sold_out" || t.orderable_state === "waitlisted";
        n.container.find("li").eq(s).toggleClass("sold-out", r), s++
    })
}, $(function () {
    function i() {
        var n = e.val().length == 0 || t.val().length == 0;
        n ? r.attr("disabled", "disabled") : r.removeAttr("disabled"), r.toggleClass("disabled", n)
    }

    if ($(".return_authorizations.new").length == 0)return;
    var e = $("#return_authorization_reason_category"), t = $("#return_authorization_reason"), n = $('form.return_authorization input[type="checkbox"]'), r = $("#submit");
    n.change(function () {
        var e = $(this), t = e.is(":checked") ? 1 : 0, n = e.parent(".return_row").find("select"), r = e.parent(".return_row").find(".chzn-container");
        n.val(t), n.trigger("liszt:updated"), t ? r.show() : r.hide()
    }), e.change(i), t.change(i), t.keyup(i), i()
}), function (e, t, n) {
    function s(e) {
        var t = {}, r = /^jQuery\d+$/;
        return n.each(e.attributes, function (e, n) {
            n.specified && !r.test(n.name) && (t[n.name] = n.value)
        }), t
    }

    function o() {
        var e = n(this);
        e.val() === e.attr("placeholder") && e.hasClass("placeholder") && (e.data("placeholder-password") ? e.hide().next().show().focus().attr("id", e.removeAttr("id").data("placeholder-id")) : e.val("").removeClass("placeholder"))
    }

    function u() {
        var e, t = n(this), r = t, i = this.id;
        if (t.val() === "") {
            if (t.is(":password")) {
                if (!t.data("placeholder-textinput")) {
                    try {
                        e = t.clone().attr({type:"text"})
                    } catch (u) {
                        e = n("<input>").attr(n.extend(s(this), {type:"text"}))
                    }
                    e.removeAttr("name").data("placeholder-password", !0).data("placeholder-id", i).bind("focus.placeholder", o), t.data("placeholder-textinput", e).data("placeholder-id", i).before(e)
                }
                t = t.removeAttr("id").hide().prev().attr("id", i).show()
            }
            t.addClass("placeholder").val(t.attr("placeholder"))
        } else t.removeClass("placeholder")
    }

    var r = "placeholder"in t.createElement("input"), i = "placeholder"in t.createElement("textarea");
    r && i ? (n.fn.placeholder = function () {
        return this
    }, n.fn.placeholder.input = n.fn.placeholder.textarea = !0) : (n.fn.placeholder = function () {
        return this.filter((r ? "textarea" : ":input") + "[placeholder]").bind("focus.placeholder", o).bind("blur.placeholder", u).trigger("blur.placeholder").end()
    }, n.fn.placeholder.input = r, n.fn.placeholder.textarea = i, n(function () {
        n("form").bind("submit.placeholder", function () {
            var e = n(".placeholder", this).each(o);
            setTimeout(function () {
                e.each(u)
            }, 10)
        })
    }), n(e).bind("unload.placeholder", function () {
        n(".placeholder").val("")
    }))
}(this, document, jQuery), function () {
    $(document).on("click", ".minus", function (e) {
        var t, n, r;
        return n = $("#" + $(this).attr("data-reference")), r = parseInt(n.val()) - 1, t = $(this).attr("data-min"), t == null && (t = 1), t = parseInt(t), n.val(Math.max(t, r)), r <= t ? $(this).addClass("disabled") : $(".plus").removeClass("disabled")
    }), $(document).on("click", ".plus", function (e) {
        var t, n, r;
        return n = $("#" + $(this).attr("data-reference")), r = parseInt(n.val()) + 1 || 1, t = $(this).attr("data-max"), t == null && (t = 5), t = parseInt(t), n.val(Math.min(t, r)), r >= t ? $(this).addClass("disabled") : $(".minus").removeClass("disabled")
    }), $("#primary-image").hoverZoom({zoomParent:$("#product-sidebar"), "in":function (e) {
        var t, n, r, i;
        return $(".product-tweets").animate({opacity:0}, 200), t = $(".button-container"), r = $("#hover-image"), i = r.offset().top + r.height() + 10, n = i - t.offset().top + 10, n > 0 ? t.animate({marginTop:n}, 500, "easeOutBack") : $("#buckle-selector").animate({opacity:0}, 200)
    }, out:function (e) {
        return $("#buckle-selector").animate({opacity:1}, 200), $(".button-container").animate({marginTop:0}, 600, "easeInOutBack", function () {
            return $(".product-tweets").animate({opacity:1})
        })
    }})
}.call(this), E.page.ShippingAddressDialogManager = function (e, t) {
    this.chooseAddressDialog = e, this.newAddressDialog = t, this.newAddressDialog.delegate(".cancel", "click", $.proxy(this.onHideNewAddress, this)), this.chooseAddressDialog.delegate(".use-address", "click", $.proxy(this.onChangeAddress, this)), this.chooseAddressDialog.delegate(".add-new-address", "click", $.proxy(this.onClickAddAddress, this)), this.newAddressDialog.bind("reveal:close", $.proxy(this.ensureClose, this)), this.chooseAddressDialog.bind("reveal:close", $.proxy(this.ensureClose, this))
}, E.page.ShippingAddressDialogManager.prototype.onHideNewAddress = function (e) {
    e.preventDefault(), this.newAddressDialog.css("visibility", "hidden"), this.chooseAddressDialog.css("visibility", "visible")
}, E.page.ShippingAddressDialogManager.prototype.onChangeAddress = function (e) {
    var t = $(e.currentTarget);
    t.parents("label").find("input[type=radio]").attr("checked", !0), this.chooseAddressDialog.find("form").submit()
}, E.page.ShippingAddressDialogManager.prototype.onClickAddAddress = function (e) {
    e.preventDefault(), this.newAddressDialog.css("visibility", "visible"), this.chooseAddressDialog.css("visibility", "hidden")
}, E.page.ShippingAddressDialogManager.prototype.ensureClose = function (e) {
    e.preventDefault(), $(".reveal-modal-bg").hide(), this.newAddressDialog.css("visibility", "hidden"), this.chooseAddressDialog.css("visibility", "hidden")
}, typeof nextThing == "undefined" && (nextThing = !1), function (t) {
    t.fn.slides = function (n) {
        return n = t.extend({}, t.fn.slides.option, n), this.each(function () {
            function N(u, a, f) {
                if (y && g)return nextThing = [u, a, f], !1;
                if (!y && g) {
                    y = !0, n.animationStart(m + 1);
                    switch (u) {
                        case"next":
                            p = m, h = m + 1, h = s === h ? 0 : h, w = o * 2, u = -o * 2, m = h;
                            break;
                        case"prev":
                            p = m, h = m - 1, h = h === -1 ? s - 1 : h, w = 0, u = 0, m = h;
                            break;
                        case"pagination":
                            h = parseInt(f, 10), p = t("." + n.paginationClass + " li." + n.currentClass + " a", r).attr("href").match("[^#/]+$"), h > p ? (w = o * 2, u = -o * 2) : h < p && (w = 0, u = 0), m = h
                    }
                    a === "fade" ? n.crossfade ? i.children(":eq(" + h + ")", r).css({zIndex:10}).fadeIn(n.fadeSpeed, n.fadeEasing, function () {
                        n.autoHeight ? i.animate({height:i.children(":eq(" + h + ")", r).outerHeight()}, n.autoHeightSpeed, function () {
                            i.children(":eq(" + p + ")", r).css({display:"none", zIndex:0}), i.children(":eq(" + h + ")", r).css({zIndex:0}), n.animationComplete(h + 1), y = !1
                        }) : (i.children(":eq(" + p + ")", r).css({display:"none", zIndex:0}), i.children(":eq(" + h + ")", r).css({zIndex:0}), n.animationComplete(h + 1), y = !1, nextThing && (d = nextThing[0], e = nextThing[1], c = nextThing[2], nextThing = !1, N(d, e, c)))
                    }) : i.children(":eq(" + p + ")", r).fadeOut(n.fadeSpeed, n.fadeEasing, function () {
                        n.autoHeight && i.animate({height:i.children(":eq(" + h + ")", r).outerHeight()}, n.autoHeightSpeed, function () {
                            i.children(":eq(" + h + ")", r).fadeIn(n.fadeSpeed, n.fadeEasing)
                        }), n.animationComplete(h + 1), y = !1
                    }) : (i.children(":eq(" + h + ")").css({left:w, display:"block"}), n.autoHeight ? i.animate({left:u, height:i.children(":eq(" + h + ")").outerHeight()}, n.slideSpeed, n.slideEasing, function () {
                        i.css({left:-o}), i.children(":eq(" + h + ")").css({left:o, zIndex:5}), i.children(":eq(" + p + ")").css({left:o, display:"none", zIndex:0}), n.animationComplete(h + 1), y = !1
                    }) : i.animate({left:u}, n.slideSpeed, n.slideEasing, function () {
                        i.css({left:-o}), i.children(":eq(" + h + ")").css({left:o, zIndex:5}), i.children(":eq(" + p + ")").css({left:o, display:"none", zIndex:0}), n.animationComplete(h + 1), y = !1, nextThing && (d = nextThing[0], e = nextThing[1], c = nextThing[2], nextThing = !1, N(d, e, c))
                    })), n.pagination && (t("." + n.paginationClass + " li." + n.currentClass, r).removeClass(n.currentClass), t("." + n.paginationClass + " li:eq(" + h + ")", r).addClass(n.currentClass))
                }
            }

            function C() {
                clearInterval(r.data("interval"))
            }

            function k() {
                n.pause ? (clearTimeout(r.data("pause")), clearInterval(r.data("interval")), x = setTimeout(function () {
                    clearTimeout(r.data("pause")), T = setInterval(function () {
                        N("next", f)
                    }, n.play), r.data("interval", T)
                }, n.pause), r.data("pause", x)) : C()
            }

            t("." + n.container, t(this)).children().wrapAll('<div class="slides_control"/>');
            var r = t(this), i = t(".slides_control", r), s = i.children().size(), o = i.children().outerWidth(), u = i.children().outerHeight(), a = n.start - 1, f = n.effect.indexOf(",") < 0 ? n.effect : n.effect.replace(" ", "").split(",")[0], l = n.effect.indexOf(",") < 0 ? f : n.effect.replace(" ", "").split(",")[1], h = 0, p = 0, v = 0, m = 0, g, y, b, w, E, S, x, T;
            if (s < 2)return t("." + n.container, t(this)).fadeIn(n.fadeSpeed, n.fadeEasing, function () {
                g = !0, n.slidesLoaded()
            }), t("." + n.next + ", ." + n.prev).fadeOut(0), !1;
            if (s < 2)return;
            a < 0 && (a = 0), a > s && (a = s - 1), n.start && (m = a), n.randomize && i.randomize(), t("." + n.container, r).css({overflow:"hidden", position:"relative"}), i.children().css({position:"absolute", top:0, left:n.effect == "fade" ? "" : i.children().outerWidth(), zIndex:0, display:"none"}), i.css({height:u, position:"relative"}), n.effect != "fade" && i.css({width:o * 3, left:-o}), t("." + n.container, r).css({display:"block"}), n.autoHeight && (i.children().css({height:"auto"}), i.animate({height:i.children(":eq(" + a + ")").outerHeight()}, n.autoHeightSpeed));
            if (n.preload && i.find("img:eq(" + a + ")").length) {
                t("." + n.container, r).css({background:"url(" + n.preloadImage + ") no-repeat 50% 50%"});
                var L = i.find("img:eq(" + a + ")").attr("src") + "?" + (new Date).getTime();
                t("img", r).parent().attr("class") != "slides_control" ? S = i.children(":eq(0)")[0].tagName.toLowerCase() : S = i.find("img:eq(" + a + ")"), i.find("img:eq(" + a + ")").attr("src", L).load(function () {
                    i.find(S + ":eq(" + a + ")").fadeIn(n.fadeSpeed, n.fadeEasing, function () {
                        t(this).css({zIndex:5}), t("." + n.container, r).css({background:""}), g = !0, n.slidesLoaded()
                    })
                })
            } else i.children(":eq(" + a + ")").fadeIn(n.fadeSpeed, n.fadeEasing, function () {
                g = !0, n.slidesLoaded(), n.animationComplete(h + 1)
            });
            n.bigTarget && (i.children().css({cursor:"pointer"}), i.children().click(function () {
                return N("next", f), !1
            })), n.hoverPause && n.play && (i.bind("mouseover", function () {
                C()
            }), i.bind("mouseleave", function () {
                k()
            })), n.generateNextPrev && (t("." + n.container, r).after('<a href="#" class="' + n.prev + '">Prev</a>'), t("." + n.prev, r).after('<a href="#" class="' + n.next + '">Next</a>')), t("." + n.next, r).click(function (e) {
                e.preventDefault(), n.play && k(), N("next", f)
            }), t("." + n.prev, r).click(function (e) {
                e.preventDefault(), n.play && k(), N("prev", f)
            }), n.generatePagination ? (n.prependPagination ? r.prepend("<ul class=" + n.paginationClass + "></ul>") : r.append("<ul class=" + n.paginationClass + "></ul>"), i.children().each(function () {
                t("." + n.paginationClass, r).append('<li><a href="#' + v + '">' + (v + 1) + "</a></li>"), v++
            })) : t("." + n.paginationClass + " li a", r).not(".pagination-ignore").each(function () {
                v++
            }), t("." + n.paginationClass + " li:eq(" + a + ")", r).addClass(n.currentClass);
            var A = function () {
                return n.play && k(), b = t(this).attr("href").match("[^#/]+$"), m != b && N("pagination", l, b), !1
            };
            t("." + n.paginationClass + " li a", r).not(".pagination-ignore").click(A), n.hoverPagination && t("." + n.paginationClass + " li a", r).not(".pagination-ignore").mousemove(A), t("a.link", r).click(function () {
                return n.play && k(), b = t(this).attr("href").match("[^#/]+$") - 1, m != b && N("pagination", l, b), !1
            }), n.play && (T = setInterval(function () {
                N("next", f)
            }, n.play), r.data("interval", T))
        })
    }, t.fn.slides.option = {preload:!1, preloadImage:"/img/loading.gif", container:"slides_container", generateNextPrev:!1, next:"next", prev:"prev", pagination:!0, generatePagination:!0, prependPagination:!1, paginationClass:"pagination", hoverPagination:!1, currentClass:"current", fadeSpeed:350, fadeEasing:"", slideSpeed:350, slideEasing:"", start:1, effect:"slide", crossfade:!1, randomize:!1, play:0, pause:0, hoverPause:!1, autoHeight:!1, autoHeightSpeed:350, bigTarget:!1, animationStart:function () {
    }, animationComplete:function () {
    }, slidesLoaded:function () {
    }}, t.fn.randomize = function (e) {
        function n() {
            return Math.round(Math.random()) - .5
        }

        return t(this).each(function () {
            var r = t(this), s = r.children(), o = s.length;
            if (o > 1) {
                s.hide();
                var u = [];
                for (i = 0; i < o; i++)u[u.length] = i;
                u = u.sort(n), t.each(u, function (t, n) {
                    var i = s.eq(n), o = i.clone(!0);
                    o.show().appendTo(r), e !== undefined && e(i, o), i.remove()
                })
            }
        })
    }
}(jQuery), function (e) {
    var t = 0;
    e.fn.EverlaneChibicart = function (n) {
        n = n || {};
        var r = this;
        return e.extend(this, {init:function (n) {
            t = n, t > 0 && (e("#bag-ribbon").css("top", "-90px"), e("#bag-badge").css("background-position", "0px " + (n - 1) * -16 + "px"), e("#bag-badge").css("top", "27px"))
        }, getCount:function () {
            return t
        }, setCount:function (n) {
            var r = this, i = t;
            t = n, n == i ? e.noop() : n == 0 ? r.dropOutEverything() : n > 0 && i == 0 ? (r._displayCount(n), r.dropInEverything()) : n > 0 && i > 0 ? r.dropOutBadge(function () {
                r._displayCount(n), r.dropInBadge()
            }) : console.error("This should not happen"), t = n
        }, _displayCount:function (t) {
            e("#bag-badge").css("background-position", "0px " + (t - 1) * -16 + "px")
        }, dropInEverything:function () {
            var t = this;
            e("#bag-ribbon").animate({top:"+=70px"}, 500, "easeOutBack", function () {
                t.dropInBadge()
            })
        }, dropOutEverything:function () {
            var t = this;
            t.dropOutBadge(), e("#bag-ribbon").animate({top:"-=70px"}, 500, "easeInBack")
        }, fattenCart:function () {
            e("#bag-icon").addClass("fat")
        }, starveCart:function () {
            e("#bag-icon").removeClass("fat")
        }, dropOutBadge:function (t) {
            e("#bag-badge").fadeOut(300, function () {
                e(this).css("top", "-16px"), t && t()
            })
        }, dropInBadge:function (t) {
            var n = this;
            n.droplock || (n.droplock = !0, e("#bag-badge").show(0).animate({top:"+=43px"}, 650, "easeOutBounce", function () {
                n.droplock = !1
            }))
        }}), this
    }
}(jQuery), function () {
    var e;
    e = function () {
        function e() {
            this.options_index = 0, this.parsed = []
        }

        return e.prototype.add_node = function (e) {
            return e.nodeName.toUpperCase() === "OPTGROUP" ? this.add_group(e) : this.add_option(e)
        }, e.prototype.add_group = function (e) {
            var t, n, r, i, s, o;
            t = this.parsed.length, this.parsed.push({array_index:t, group:!0, label:e.label, children:0, disabled:e.disabled}), s = e.childNodes, o = [];
            for (r = 0, i = s.length; r < i; r++)n = s[r], o.push(this.add_option(n, t, e.disabled));
            return o
        }, e.prototype.add_option = function (e, t, n) {
            if (e.nodeName.toUpperCase() === "OPTION")return e.text !== "" ? (t != null && (this.parsed[t].children += 1), this.parsed.push({array_index:this.parsed.length, options_index:this.options_index, value:e.value, text:e.text, html:e.innerHTML, selected:e.selected, disabled:n === !0 ? n : e.disabled, group_array_index:t, classes:e.className, style:e.style.cssText})) : this.parsed.push({array_index:this.parsed.length, options_index:this.options_index, empty:!0}), this.options_index += 1
        }, e
    }(), e.select_to_array = function (t) {
        var n, r, i, s, o;
        r = new e, o = t.childNodes;
        for (i = 0, s = o.length; i < s; i++)n = o[i], r.add_node(n);
        return r.parsed
    }, this.SelectParser = e
}.call(this), function () {
    var e, t;
    t = this, e = function () {
        function e(e, t) {
            this.form_field = e, this.options = t != null ? t : {}, this.is_multiple = this.form_field.multiple, this.set_default_text(), this.set_default_values(), this.setup(), this.set_up_html(), this.register_observers(), this.finish_setup()
        }

        return e.prototype.set_default_values = function () {
            var e = this;
            return this.click_test_action = function (t) {
                return e.test_active_click(t)
            }, this.activate_action = function (t) {
                return e.activate_field(t)
            }, this.active_field = !1, this.mouse_on_container = !1, this.results_showing = !1, this.result_highlighted = null, this.result_single_selected = null, this.allow_single_deselect = this.options.allow_single_deselect != null && this.form_field.options[0] != null && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : !1, this.disable_search_threshold = this.options.disable_search_threshold || 0, this.disable_search = this.options.disable_search || !1, this.hide_search = this.options.hide_search || !1, this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : !0, this.search_contains = this.options.search_contains || !1, this.choices = 0, this.single_backstroke_delete = this.options.single_backstroke_delete || !1, this.max_selected_options = this.options.max_selected_options || Infinity, this.inherit_select_classes = this.options.inherit_select_classes || !1
        }, e.prototype.set_default_text = function () {
            return this.form_field.getAttribute("data-placeholder") ? this.default_text = this.form_field.getAttribute("data-placeholder") : this.is_multiple ? this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || "Select Some Options" : this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || "Select an Option", this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || "No results match"
        }, e.prototype.mouse_enter = function () {
            return this.mouse_on_container = !0
        }, e.prototype.mouse_leave = function () {
            return this.mouse_on_container = !1
        }, e.prototype.input_focus = function (e) {
            var t = this;
            if (this.is_multiple) {
                if (!this.active_field)return setTimeout(function () {
                    return t.container_mousedown()
                }, 50)
            } else if (!this.active_field)return this.activate_field()
        }, e.prototype.input_blur = function (e) {
            var t = this;
            if (!this.mouse_on_container)return this.active_field = !1, setTimeout(function () {
                return t.blur_test()
            }, 100)
        }, e.prototype.result_add_option = function (e) {
            var t, n;
            return e.disabled ? "" : (e.dom_id = this.container_id + "_o_" + e.array_index, t = e.selected && this.is_multiple ? [] : ["active-result"], e.selected && t.push("result-selected"), e.group_array_index != null && t.push("group-option"), e.classes !== "" && t.push(e.classes), n = e.style.cssText !== "" ? ' style="' + e.style + '"' : "", '<li id="' + e.dom_id + '" class="' + t.join(" ") + '"' + n + ">" + e.html + "</li>")
        }, e.prototype.results_update_field = function () {
            return this.is_multiple || this.results_reset_cleanup(), this.result_clear_highlight(), this.result_single_selected = null, this.results_build()
        }, e.prototype.results_toggle = function () {
            return this.results_showing ? this.results_hide() : this.results_show()
        }, e.prototype.results_search = function (e) {
            return this.results_showing ? this.winnow_results() : this.results_show()
        }, e.prototype.keyup_checker = function (e) {
            var t, n;
            t = (n = e.which) != null ? n : e.keyCode, this.search_field_scale();
            switch (t) {
                case 8:
                    if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0)return this.keydown_backstroke();
                    if (!this.pending_backstroke)return this.result_clear_highlight(), this.results_search();
                    break;
                case 13:
                    e.preventDefault();
                    if (this.results_showing)return this.result_select(e);
                    break;
                case 27:
                    return this.results_showing && this.results_hide(), !0;
                case 9:
                case 38:
                case 40:
                case 16:
                case 91:
                case 17:
                    break;
                default:
                    return this.results_search()
            }
        }, e.prototype.generate_field_id = function () {
            var e;
            return e = this.generate_random_id(), this.form_field.id = e, e
        }, e.prototype.generate_random_char = function () {
            var e, t, n;
            return e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", n = Math.floor(Math.random() * e.length), t = e.substring(n, n + 1)
        }, e
    }(), t.AbstractChosen = e
}.call(this), function () {
    var e, t, n, r, i = {}.hasOwnProperty, s = function (e, t) {
        function r() {
            this.constructor = e
        }

        for (var n in t)i.call(t, n) && (e[n] = t[n]);
        return r.prototype = t.prototype, e.prototype = new r, e.__super__ = t.prototype, e
    };
    r = this, e = jQuery, e.fn.extend({chosen:function (n) {
        return this.each(function (r) {
            var i;
            i = e(this);
            if (!i.hasClass("chzn-done"))return i.data("chosen", new t(this, n))
        })
    }}), t = function (t) {
        function i() {
            return i.__super__.constructor.apply(this, arguments)
        }

        return s(i, t), i.prototype.setup = function () {
            return this.form_field_jq = e(this.form_field), this.current_value = this.form_field_jq.val(), this.is_rtl = this.form_field_jq.hasClass("chzn-rtl")
        }, i.prototype.finish_setup = function () {
            return this.form_field_jq.addClass("chzn-done")
        }, i.prototype.set_up_html = function () {
            var t, r, i, s, o, u;
            return this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, "_") : this.generate_field_id(), this.container_id += "_chzn", t = ["chzn-container"], t.push("chzn-container-" + (this.is_multiple ? "multi" : "single")), this.inherit_select_classes && this.form_field.className && t.push(this.form_field.className), this.is_rtl && t.push("chzn-rtl"), this.f_width = this.form_field_jq.outerWidth(), i = {id:this.container_id, "class":t.join(" "), style:"width: " + this.f_width + "px;", title:this.form_field.title}, r = e("<div />", i), this.is_multiple ? r.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>') : r.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'), this.form_field_jq.hide().after(r), this.container = e("#" + this.container_id), this.dropdown = this.container.find("div.chzn-drop").first(), s = this.container.height(), o = this.f_width - n(this.dropdown), this.dropdown.css({width:o + "px", top:s + "px"}), this.search_field = this.container.find("input").first(), this.search_results = this.container.find("ul.chzn-results").first(), this.search_field_scale(), this.search_no_results = this.container.find("li.no-results").first(), this.is_multiple ? (this.search_choices = this.container.find("ul.chzn-choices").first(), this.search_container = this.container.find("li.search-field").first()) : (this.search_container = this.container.find("div.chzn-search").first(), this.selected_item = this.container.find(".chzn-single").first(), u = o - n(this.search_container) - n(this.search_field), this.search_field.css({width:u + "px"})), this.results_build(), this.set_tab_index(), this.form_field_jq.trigger("liszt:ready", {chosen:this})
        }, i.prototype.register_observers = function () {
            var e = this;
            return this.container.mousedown(function (t) {
                return e.container_mousedown(t)
            }), this.container.mouseup(function (t) {
                return e.container_mouseup(t)
            }), this.container.mouseenter(function (t) {
                return e.mouse_enter(t)
            }), this.container.mouseleave(function (t) {
                return e.mouse_leave(t)
            }), this.search_results.mouseup(function (t) {
                return e.search_results_mouseup(t)
            }), this.search_results.mouseover(function (t) {
                return e.search_results_mouseover(t)
            }), this.search_results.mouseout(function (t) {
                return e.search_results_mouseout(t)
            }), this.form_field_jq.bind("liszt:updated", function (t) {
                return e.results_update_field(t)
            }), this.form_field_jq.bind("liszt:activate", function (t) {
                return e.activate_field(t)
            }), this.form_field_jq.bind("liszt:open", function (t) {
                return e.container_mousedown(t)
            }), this.search_field.blur(function (t) {
                return e.input_blur(t)
            }), this.search_field.keyup(function (t) {
                return e.keyup_checker(t)
            }), this.search_field.keydown(function (t) {
                return e.keydown_checker(t)
            }), this.search_field.focus(function (t) {
                return e.input_focus(t)
            }), this.is_multiple ? this.search_choices.click(function (t) {
                return e.choices_click(t)
            }) : this.container.click(function (e) {
                return e.preventDefault()
            })
        }, i.prototype.search_field_disabled = function () {
            this.is_disabled = this.form_field_jq[0].disabled;
            if (this.is_disabled)return this.container.addClass("chzn-disabled"), this.search_field[0].disabled = !0, this.is_multiple || this.selected_item.unbind("focus", this.activate_action), this.close_field();
            this.container.removeClass("chzn-disabled"), this.search_field[0].disabled = !1;
            if (!this.is_multiple)return this.selected_item.bind("focus", this.activate_action)
        }, i.prototype.container_mousedown = function (t) {
            var n;
            if (!this.is_disabled)return n = t != null ? e(t.target).hasClass("search-choice-close") : !1, t && t.type === "mousedown" && !this.results_showing && t.preventDefault(), !this.pending_destroy_click && !n ? (this.active_field ? !this.is_multiple && t && (e(t.target)[0] === this.selected_item[0] || e(t.target).parents("a.chzn-single").length) && (t.preventDefault(), this.results_toggle()) : (this.is_multiple && this.search_field.val(""), e(document).click(this.click_test_action), this.results_show()), this.activate_field()) : this.pending_destroy_click = !1
        }, i.prototype.container_mouseup = function (e) {
            if (e.target.nodeName === "ABBR" && !this.is_disabled)return this.results_reset(e)
        }, i.prototype.blur_test = function (e) {
            if (!this.active_field && this.container.hasClass("chzn-container-active"))return this.close_field()
        }, i.prototype.close_field = function () {
            return e(document).unbind("click", this.click_test_action), this.active_field = !1, this.results_hide(), this.container.removeClass("chzn-container-active"), this.winnow_results_clear(), this.clear_backstroke(), this.show_search_field_default(), this.search_field_scale()
        }, i.prototype.activate_field = function () {
            return this.container.addClass("chzn-container-active"), this.active_field = !0, this.search_field.val(this.search_field.val()), this.search_field.focus()
        }, i.prototype.test_active_click = function (t) {
            return e(t.target).parents("#" + this.container_id).length ? this.active_field = !0 : this.close_field()
        }, i.prototype.results_build = function () {
            var e, t, n, i, s;
            this.parsing = !0, this.results_data = r.SelectParser.select_to_array(this.form_field), this.is_multiple && this.choices > 0 ? (this.search_choices.find("li.search-choice").remove(), this.choices = 0) : this.is_multiple || (this.selected_item.addClass("chzn-default").find("span").text(this.default_text), this.hide_search ? this.container.addClass("chzn-container-single-hidesearch") : this.disable_search || this.form_field.options.length <= this.disable_search_threshold ? this.container.addClass("chzn-container-single-nosearch") : this.container.removeClass("chzn-container-single-nosearch")), e = "", s = this.results_data;
            for (n = 0, i = s.length; n < i; n++)t = s[n], t.group ? e += this.result_add_group(t) : t.empty || (e += this.result_add_option(t), t.selected && this.is_multiple ? this.choice_build(t) : t.selected && !this.is_multiple && (this.selected_item.removeClass("chzn-default").find("span").text(t.text), this.allow_single_deselect && this.single_deselect_control_build()));
            return this.search_field_disabled(), this.show_search_field_default(), this.search_field_scale(), this.search_results.html(e), this.parsing = !1
        }, i.prototype.result_add_group = function (t) {
            return t.disabled ? "" : (t.dom_id = this.container_id + "_g_" + t.array_index, '<li id="' + t.dom_id + '" class="group-result">' + e("<div />").text(t.label).html() + "</li>")
        }, i.prototype.result_do_highlight = function (e) {
            var t, n, r, i, s;
            if (e.length) {
                this.result_clear_highlight(), this.result_highlight = e, this.result_highlight.addClass("highlighted"), r = parseInt(this.search_results.css("maxHeight"), 10), s = this.search_results.scrollTop(), i = r + s, n = this.result_highlight.position().top + this.search_results.scrollTop(), t = n + this.result_highlight.outerHeight();
                if (t >= i)return this.search_results.scrollTop(t - r > 0 ? t - r : 0);
                if (n < s)return this.search_results.scrollTop(n)
            }
        }, i.prototype.result_clear_highlight = function () {
            return this.result_highlight && this.result_highlight.removeClass("highlighted"), this.result_highlight = null
        }, i.prototype.results_show = function () {
            var e;
            if (!this.is_multiple)this.selected_item.addClass("chzn-single-with-drop"), this.result_single_selected && this.result_do_highlight(this.result_single_selected); else if (this.max_selected_options <= this.choices)return this.form_field_jq.trigger("liszt:maxselected", {chosen:this}), !1;
            return e = this.is_multiple ? this.container.height() : this.container.height() - 1, this.form_field_jq.trigger("liszt:showing_dropdown", {chosen:this}), this.dropdown.css({top:e + "px", left:0}), this.results_showing = !0, this.search_field.focus(), this.search_field.val(this.search_field.val()), this.winnow_results()
        }, i.prototype.results_hide = function () {
            return this.is_multiple || this.selected_item.removeClass("chzn-single-with-drop"), this.result_clear_highlight(), this.form_field_jq.trigger("liszt:hiding_dropdown", {chosen:this}), this.dropdown.css({left:"-9000px"}), this.results_showing = !1
        }, i.prototype.set_tab_index = function (e) {
            var t;
            if (this.form_field_jq.attr("tabindex"))return t = this.form_field_jq.attr("tabindex"), this.form_field_jq.attr("tabindex", -1), this.search_field.attr("tabindex", t)
        }, i.prototype.show_search_field_default = function () {
            return this.is_multiple && this.choices < 1 && !this.active_field ? (this.search_field.val(this.default_text), this.search_field.addClass("default")) : (this.search_field.val(""), this.search_field.removeClass("default"))
        }, i.prototype.search_results_mouseup = function (t) {
            var n;
            n = e(t.target).hasClass("active-result") ? e(t.target) : e(t.target).parents(".active-result").first();
            if (n.length)return this.result_highlight = n, this.result_select(t), this.search_field.focus()
        }, i.prototype.search_results_mouseover = function (t) {
            var n;
            n = e(t.target).hasClass("active-result") ? e(t.target) : e(t.target).parents(".active-result").first();
            if (n)return this.result_do_highlight(n)
        }, i.prototype.search_results_mouseout = function (t) {
            if (e(t.target).hasClass("active-result"))return this.result_clear_highlight()
        }, i.prototype.choices_click = function (t) {
            t.preventDefault();
            if (this.active_field && !e(t.target).hasClass("search-choice") && !this.results_showing)return this.results_show()
        }, i.prototype.choice_build = function (t) {
            var n, r, i, s = this;
            return this.is_multiple && this.max_selected_options <= this.choices ? (this.form_field_jq.trigger("liszt:maxselected", {chosen:this}), !1) : (n = this.container_id + "_c_" + t.array_index, this.choices += 1, t.disabled ? r = '<li class="search-choice search-choice-disabled" id="' + n + '"><span>' + t.html + "</span></li>" : r = '<li class="search-choice" id="' + n + '"><span>' + t.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + t.array_index + '"></a></li>', this.search_container.before(r), i = e("#" + n).find("a").first(), i.click(function (e) {
                return s.choice_destroy_link_click(e)
            }))
        }, i.prototype.choice_destroy_link_click = function (t) {
            return t.preventDefault(), this.is_disabled ? t.stopPropagation : (this.pending_destroy_click = !0, this.choice_destroy(e(t.target)))
        }, i.prototype.choice_destroy = function (e) {
            if (this.result_deselect(e.attr("rel")))return this.choices -= 1, this.show_search_field_default(), this.is_multiple && this.choices > 0 && this.search_field.val().length < 1 && this.results_hide(), e.parents("li").first().remove(), this.search_field_scale()
        }, i.prototype.results_reset = function () {
            this.form_field.options[0].selected = !0, this.selected_item.find("span").text(this.default_text), this.is_multiple || this.selected_item.addClass("chzn-default"), this.show_search_field_default(), this.results_reset_cleanup(), this.form_field_jq.trigger("change");
            if (this.active_field)return this.results_hide()
        }, i.prototype.results_reset_cleanup = function () {
            return this.current_value = this.form_field_jq.val(), this.selected_item.find("abbr").remove()
        }, i.prototype.result_select = function (e) {
            var t, n, r, i;
            if (this.result_highlight)return t = this.result_highlight, n = t.attr("id"), this.result_clear_highlight(), this.is_multiple ? this.result_deactivate(t) : (this.search_results.find(".result-selected").removeClass("result-selected"), this.result_single_selected = t, this.selected_item.removeClass("chzn-default")), t.addClass("result-selected"), i = n.substr(n.lastIndexOf("_") + 1), r = this.results_data[i], r.selected = !0, this.form_field.options[r.options_index].selected = !0, this.is_multiple ? this.choice_build(r) : (this.selected_item.find("span").first().text(r.text), this.allow_single_deselect && this.single_deselect_control_build()), (!e.metaKey && !e.ctrlKey || !this.is_multiple) && this.results_hide(), this.search_field.val(""), (this.is_multiple || this.form_field_jq.val() !== this.current_value) && this.form_field_jq.trigger("change", {selected:this.form_field.options[r.options_index].value}), this.current_value = this.form_field_jq.val(), this.search_field_scale()
        }, i.prototype.result_activate = function (e) {
            return e.addClass("active-result")
        }, i.prototype.result_deactivate = function (e) {
            return e.removeClass("active-result")
        }, i.prototype.result_deselect = function (t) {
            var n, r;
            return r = this.results_data[t], this.form_field.options[r.options_index].disabled ? !1 : (r.selected = !1, this.form_field.options[r.options_index].selected = !1, n = e("#" + this.container_id + "_o_" + t), n.removeClass("result-selected").addClass("active-result").show(), this.result_clear_highlight(), this.winnow_results(), this.form_field_jq.trigger("change", {deselected:this.form_field.options[r.options_index].value}), this.search_field_scale(), !0)
        }, i.prototype.single_deselect_control_build = function () {
            if (this.allow_single_deselect && this.selected_item.find("abbr").length < 1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')
        }, i.prototype.winnow_results = function () {
            var t, n, r, i, s, o, u, a, f, l, c, h, p, d, v, m, g, y;
            this.no_results_clear(), f = 0, l = this.search_field.val() === this.default_text ? "" : e("<div/>").text(e.trim(this.search_field.val())).html(), o = this.search_contains ? "" : "^", s = new RegExp(o + l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "i"), p = new RegExp(l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "i"), y = this.results_data;
            for (d = 0, m = y.length; d < m; d++) {
                n = y[d];
                if (!n.disabled && !n.empty)if (n.group)e("#" + n.dom_id).css("display", "none"); else if (!this.is_multiple || !n.selected) {
                    t = !1, a = n.dom_id, u = e("#" + a);
                    if (s.test(n.html))t = !0, f += 1; else if (this.enable_split_word_search && (n.html.indexOf(" ") >= 0 || n.html.indexOf("[") === 0)) {
                        i = n.html.replace(/\[|\]/g, "").split(" ");
                        if (i.length)for (v = 0, g = i.length; v < g; v++)r = i[v], s.test(r) && (t = !0, f += 1)
                    }
                    t ? (l.length ? (c = n.html.search(p), h = n.html.substr(0, c + l.length) + "</em>" + n.html.substr(c + l.length), h = h.substr(0, c) + "<em>" + h.substr(c)) : h = n.html, u.html(h), this.result_activate(u), n.group_array_index != null && e("#" + this.results_data[n.group_array_index].dom_id).css("display", "list-item")) : (this.result_highlight && a === this.result_highlight.attr("id") && this.result_clear_highlight(), this.result_deactivate(u))
                }
            }
            return f < 1 && l.length ? this.no_results(l) : this.winnow_results_set_highlight()
        }, i.prototype.winnow_results_clear = function () {
            var t, n, r, i, s;
            this.search_field.val(""), n = this.search_results.find("li"), s = [];
            for (r = 0, i = n.length; r < i; r++)t = n[r], t = e(t), t.hasClass("group-result") ? s.push(t.css("display", "auto")) : !this.is_multiple || !t.hasClass("result-selected") ? s.push(this.result_activate(t)) : s.push(void 0);
            return s
        }, i.prototype.winnow_results_set_highlight = function () {
            var e, t;
            if (!this.result_highlight) {
                t = this.is_multiple ? [] : this.search_results.find(".result-selected.active-result"), e = t.length ? t.first() : this.search_results.find(".active-result").first();
                if (e != null)return this.result_do_highlight(e)
            }
        }, i.prototype.no_results = function (t) {
            var n;
            return n = e('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>'), n.find("span").first().html(t), this.search_results.append(n)
        }, i.prototype.no_results_clear = function () {
            return this.search_results.find(".no-results").remove()
        }, i.prototype.keydown_arrow = function () {
            var t, n;
            this.result_highlight ? this.results_showing && (n = this.result_highlight.nextAll("li.active-result").first(), n && this.result_do_highlight(n)) : (t = this.search_results.find("li.active-result").first(), t && this.result_do_highlight(e(t)));
            if (!this.results_showing)return this.results_show()
        }, i.prototype.keyup_arrow = function () {
            var e;
            if (!this.results_showing && !this.is_multiple)return this.results_show();
            if (this.result_highlight)return e = this.result_highlight.prevAll("li.active-result"), e.length ? this.result_do_highlight(e.first()) : (this.choices > 0 && this.results_hide(), this.result_clear_highlight())
        }, i.prototype.keydown_backstroke = function () {
            var e;
            if (this.pending_backstroke)return this.choice_destroy(this.pending_backstroke.find("a").first()), this.clear_backstroke();
            e = this.search_container.siblings("li.search-choice").last();
            if (e.length && !e.hasClass("search-choice-disabled"))return this.pending_backstroke = e, this.single_backstroke_delete ? this.keydown_backstroke() : this.pending_backstroke.addClass("search-choice-focus")
        }, i.prototype.clear_backstroke = function () {
            return this.pending_backstroke && this.pending_backstroke.removeClass("search-choice-focus"), this.pending_backstroke = null
        }, i.prototype.keydown_checker = function (e) {
            var t, n;
            t = (n = e.which) != null ? n : e.keyCode, this.search_field_scale(), t !== 8 && this.pending_backstroke && this.clear_backstroke();
            switch (t) {
                case 8:
                    this.backstroke_length = this.search_field.val().length;
                    break;
                case 9:
                    this.results_showing && !this.is_multiple && this.result_select(e), this.mouse_on_container = !1;
                    break;
                case 13:
                    e.preventDefault();
                    break;
                case 38:
                    e.preventDefault(), this.keyup_arrow();
                    break;
                case 40:
                    this.keydown_arrow()
            }
        }, i.prototype.search_field_scale = function () {
            var t, n, r, i, s, o, u, a, f;
            if (this.is_multiple) {
                r = 0, u = 0, s = "position:absolute; left: -1000px; top: -1000px; display:none;", o = ["font-size"
                    , "font-style", "font-weight", "font-family", "line-height", "text-transform", "letter-spacing"];
                for (a = 0, f = o.length; a < f; a++)i = o[a], s += i + ":" + this.search_field.css(i) + ";";
                return n = e("<div />", {style:s}), n.text(this.search_field.val()), e("body").append(n), u = n.width() + 25, n.remove(), u > this.f_width - 10 && (u = this.f_width - 10), this.search_field.css({width:u + "px"}), t = this.container.height(), this.dropdown.css({top:t + "px"})
            }
        }, i.prototype.generate_random_id = function () {
            var t;
            t = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char();
            while (e("#" + t).length > 0)t += this.generate_random_char();
            return t
        }, i
    }(AbstractChosen), r.Chosen = t, n = function (e) {
        var t;
        return t = e.outerWidth() - e.width()
    }, r.get_side_border_padding = n
}.call(this), function (e) {
    typeof define == "function" && define.amd && define.amd.jQuery ? define(["jquery"], e) : e(jQuery)
}(function (e) {
    function n(e) {
        return e
    }

    function r(e) {
        return decodeURIComponent(e.replace(t, " "))
    }

    function i(e) {
        e.indexOf('"') === 0 && (e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
        try {
            return s.json ? JSON.parse(e) : e
        } catch (t) {
        }
    }

    var t = /\+/g, s = e.cookie = function (t, o, u) {
        if (o !== undefined) {
            u = e.extend({}, s.defaults, u);
            if (typeof u.expires == "number") {
                var a = u.expires, f = u.expires = new Date;
                f.setDate(f.getDate() + a)
            }
            return o = s.json ? JSON.stringify(o) : String(o), document.cookie = [encodeURIComponent(t), "=", s.raw ? o : encodeURIComponent(o), u.expires ? "; expires=" + u.expires.toUTCString() : "", u.path ? "; path=" + u.path : "", u.domain ? "; domain=" + u.domain : "", u.secure ? "; secure" : ""].join("")
        }
        var l = s.raw ? n : r, c = document.cookie.split("; "), h = t ? undefined : {};
        for (var p = 0, d = c.length; p < d; p++) {
            var v = c[p].split("="), m = l(v.shift()), g = l(v.join("="));
            if (t && t === m) {
                h = i(g);
                break
            }
            t || (h[m] = i(g))
        }
        return h
    };
    s.defaults = {}, e.removeCookie = function (t, n) {
        return e.cookie(t) !== undefined ? (e.cookie(t, "", e.extend(n, {expires:-1})), !0) : !1
    }
}), !function (e) {
    e.fn.EverlaneTwitter = function (t) {
        t = t || {};
        var n = t.template || "#product-tweet-template", r = t.attrib || ".attribution", i = t.content || ".tweet-text", s = t.handle || "nanateverlane", o = t.callback || function (e) {
            console.info("twitter returned data:" + e)
        }, u = t.count || 8, a = t.userImg || "img.user-icon";
        e.extend(this, {getRetweets:function (t) {
            e.ajax("https://api.twitter.com/1/statuses/retweeted_by_user.json", {dataType:"jsonp", data:{screen_name:s, count:u, include_entities:!0}, statusCode:{400:function () {
                console.warn("We are being rate limited by the Twitter REST   API")
            }, 420:function () {
                console.warn("We are being rate limited by the Twitter Search API")
            }}, success:function (e, n) {
                console.info("Called twitter with return status:", n), t(e), o(e)
            }})
        }, formatTweet:function (t) {
            var s = t.retweeted_status, o = s.text, u = s.user.screen_name, f = s.user.profile_image_url_https, l = s.id_str, c = e(n).clone().removeAttr("id");
            return c.find(r).text("@" + u).attr("href", "https://twitter.com/#!/" + u + "/status/" + l), c.find(i).html(this.processSyntax(o)), c.find(a).attr("src", f), c
        }, processSyntax:function (e) {
            return e && (e = e.replace(/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi,function (e) {
                var t = e;
                return t.match("^https?://") || (t = "http://" + t), '<a href="' + t + '" target="_blank">' + e + "</a>"
            }).replace(/\B@([_a-z0-9]+)/ig,function (e) {
                    return"<strong>" + e + "</strong>"
                }).replace(/\B#([_a-z0-9]+)/ig, function (e) {
                    return"<strong>" + e + "</strong>"
                })), e
        }});
        var f = this;
        return f.getRetweets(function (t) {
            for (var r = 0, i = t.length; r < i; r++) {
                var s = f.formatTweet(t[r]);
                f.append(s)
            }
            e(n).remove()
        }), f
    }
}(jQuery), function () {
    var e, t, n, r, i, s, o, u, a, f, l, c, h, p, d, v, m, g, y, b = [].slice, w = [].indexOf || function (e) {
        for (var t = 0, n = this.length; t < n; t++)if (t in this && this[t] === e)return t;
        return-1
    }, E = this;
    e = jQuery, e.payment = {}, e.payment.fn = {}, e.fn.payment = function () {
        var t, n;
        return n = arguments[0], t = 2 <= arguments.length ? b.call(arguments, 1) : [], e.payment.fn[n].apply(this, t)
    }, i = /(\d{1,4})/g, r = [
        {type:"maestro", pattern:/^(5018|5020|5038|6304|6759|676[1-3])/, format:i, length:[12, 13, 14, 15, 16, 17, 18, 19], cvcLength:[3], luhn:!0},
        {type:"dinersclub", pattern:/^(36|38|30[0-5])/, format:i, length:[14], cvcLength:[3], luhn:!0},
        {type:"laser", pattern:/^(6706|6771|6709)/, format:i, length:[16, 17, 18, 19], cvcLength:[3], luhn:!0},
        {type:"jcb", pattern:/^35/, format:i, length:[16], cvcLength:[3], luhn:!0},
        {type:"unionpay", pattern:/^62/, format:i, length:[16, 17, 18, 19], cvcLength:[3], luhn:!1},
        {type:"discover", pattern:/^(6011|65|64[4-9]|622)/, format:i, length:[16], cvcLength:[3], luhn:!0},
        {type:"mastercard", pattern:/^5[1-5]/, format:i, length:[16], cvcLength:[3], luhn:!0},
        {type:"amex", pattern:/^3[47]/, format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/, length:[15], cvcLength:[4], luhn:!0},
        {type:"visa", pattern:/^4/, format:i, length:[13, 14, 15, 16], cvcLength:[3], luhn:!0}
    ], t = function (e) {
        var t, n, i;
        e = (e + "").replace(/\D/g, "");
        for (n = 0, i = r.length; n < i; n++) {
            t = r[n];
            if (t.pattern.test(e))return t
        }
    }, n = function (e) {
        var t, n, i;
        for (n = 0, i = r.length; n < i; n++) {
            t = r[n];
            if (t.type === e)return t
        }
    }, h = function (e) {
        var t, n, r, i, s, o;
        r = !0, i = 0, n = (e + "").split("").reverse();
        for (s = 0, o = n.length; s < o; s++) {
            t = n[s], t = parseInt(t, 10);
            if (r = !r)t *= 2;
            t > 9 && (t -= 9), i += t
        }
        return i % 10 === 0
    }, c = function (e) {
        var t;
        return e.prop("selectionStart") != null && e.prop("selectionStart") !== e.prop("selectionEnd") ? !0 : (typeof document != "undefined" && document !== null ? (t = document.selection) != null ? typeof t.createRange == "function" ? t.createRange().text : void 0 : void 0 : void 0) ? !0 : !1
    }, p = function (t) {
        var n = this;
        return setTimeout(function () {
            var n, r;
            return n = e(t.currentTarget), r = n.val(), r = e.payment.formatCardNumber(r), n.val(r)
        })
    }, u = function (n) {
        var r, i, s, o, u, a, f;
        s = String.fromCharCode(n.which);
        if (!/^\d+$/.test(s))return;
        r = e(n.currentTarget), f = r.val(), i = t(f + s), o = (f.replace(/\D/g, "") + s).length, a = 16, i && (a = i.length[i.length.length - 1]);
        if (o >= a)return;
        if (r.prop("selectionStart") != null && r.prop("selectionStart") !== f.length)return;
        i && i.type === "amex" ? u = /^(\d{4}|\d{4}\s\d{6})$/ : u = /(?:^|\s)(\d{4})$/;
        if (u.test(f))return n.preventDefault(), r.val(f + " " + s);
        if (u.test(f + s))return n.preventDefault(), r.val(f + s + " ")
    }, s = function (t) {
        var n, r;
        n = e(t.currentTarget), r = n.val();
        if (t.meta)return;
        if (n.prop("selectionStart") != null && n.prop("selectionStart") !== r.length)return;
        if (t.which === 8 && /\s\d?$/.test(r))return t.preventDefault(), n.val(r.replace(/\s\d?$/, ""))
    }, a = function (t) {
        var n, r, i;
        r = String.fromCharCode(t.which);
        if (!/^\d+$/.test(r))return;
        n = e(t.currentTarget), i = n.val() + r;
        if (/^\d$/.test(i) && i !== "0" && i !== "1")return t.preventDefault(), n.val("0" + i + " / ");
        if (/^\d\d$/.test(i))return t.preventDefault(), n.val("" + i + " / ")
    }, f = function (t) {
        var n, r, i;
        r = String.fromCharCode(t.which);
        if (!/^\d+$/.test(r))return;
        n = e(t.currentTarget), i = n.val();
        if (/^\d\d$/.test(i))return n.val("" + i + " / ")
    }, l = function (t) {
        var n, r, i;
        r = String.fromCharCode(t.which);
        if (r !== "/")return;
        n = e(t.currentTarget), i = n.val();
        if (/^\d$/.test(i) && i !== "0")return n.val("0" + i + " / ")
    }, o = function (t) {
        var n, r;
        if (t.meta)return;
        n = e(t.currentTarget), r = n.val();
        if (t.which !== 8)return;
        if (n.prop("selectionStart") != null && n.prop("selectionStart") !== r.length)return;
        if (/\s\/\s?\d?$/.test(r))return t.preventDefault(), n.val(r.replace(/\s\/\s?\d?$/, ""))
    }, g = function (e) {
        var t;
        return e.metaKey || e.ctrlKey ? !0 : e.which === 32 ? !1 : e.which === 0 ? !0 : e.which < 33 ? !0 : (t = String.fromCharCode(e.which), !!/[\d\s]/.test(t))
    }, v = function (n) {
        var r, i, s, o;
        r = e(n.currentTarget), s = String.fromCharCode(n.which);
        if (!/^\d+$/.test(s))return;
        if (c(r))return;
        return o = (r.val() + s).replace(/\D/g, ""), i = t(o), i ? o.length <= i.length[i.length.length - 1] : o.length <= 16
    }, m = function (t) {
        var n, r, i;
        n = e(t.currentTarget), r = String.fromCharCode(t.which);
        if (!/^\d+$/.test(r))return;
        if (c(n))return;
        i = n.val() + r, i = i.replace(/\D/g, "");
        if (i.length > 6)return!1
    }, d = function (t) {
        var n, r, i;
        n = e(t.currentTarget), r = String.fromCharCode(t.which);
        if (!/^\d+$/.test(r))return;
        return i = n.val() + r, i.length <= 4
    }, y = function (t) {
        var n, i, s, o, u;
        n = e(t.currentTarget), u = n.val(), o = e.payment.cardType(u) || "unknown";
        if (!n.hasClass(o))return i = function () {
            var e, t, n;
            n = [];
            for (e = 0, t = r.length; e < t; e++)s = r[e], n.push(s.type);
            return n
        }(), n.removeClass("unknown"), n.removeClass(i.join(" ")), n.addClass(o), n.toggleClass("identified", o !== "unknown"), n.trigger("payment.cardType", o)
    }, e.payment.fn.formatCardCVC = function () {
        return this.payment("restrictNumeric"), this.on("keypress", d), this
    }, e.payment.fn.formatCardExpiry = function () {
        return this.payment("restrictNumeric"), this.on("keypress", m), this.on("keypress", a), this.on("keypress", l), this.on("keypress", f), this.on("keydown", o), this
    }, e.payment.fn.formatCardNumber = function () {
        return this.payment("restrictNumeric"), this.on("keypress", v), this.on("keypress", u), this.on("keydown", s), this.on("keyup", y), this.on("paste", p), this
    }, e.payment.fn.restrictNumeric = function () {
        return this.on("keypress", g), this
    }, e.payment.fn.cardExpiryVal = function () {
        return e.payment.cardExpiryVal(e(this).val())
    }, e.payment.cardExpiryVal = function (e) {
        var t, n, r, i;
        return e = e.replace(/\s/g, ""), i = e.split("/", 2), t = i[0], r = i[1], (r != null ? r.length : void 0) === 2 && /^\d+$/.test(r) && (n = (new Date).getFullYear(), n = n.toString().slice(0, 2), r = n + r), t = parseInt(t, 10), r = parseInt(r, 10), {month:t, year:r}
    }, e.payment.validateCardNumber = function (e) {
        var n, r;
        return e = (e + "").replace(/\s+|-/g, ""), /^\d+$/.test(e) ? (n = t(e), n ? (r = e.length, w.call(n.length, r) >= 0) && (n.luhn === !1 || h(e)) : !1) : !1
    }, e.payment.validateCardExpiry = function (t, n) {
        var r, i, s, o;
        return typeof t == "object" && "month"in t && (o = t, t = o.month, n = o.year), !t || !n ? !1 : (t = e.trim(t), n = e.trim(n), /^\d+$/.test(t) ? /^\d+$/.test(n) ? parseInt(t, 10) <= 12 ? (n.length === 2 && (s = (new Date).getFullYear(), s = s.toString().slice(0, 2), n = s + n), i = new Date(n, t), r = new Date, i.setMonth(i.getMonth() - 1), i.setMonth(i.getMonth() + 1, 1), i > r) : !1 : !1 : !1)
    }, e.payment.validateCardCVC = function (t, r) {
        var i, s;
        return t = e.trim(t), /^\d+$/.test(t) ? r ? (i = t.length, w.call((s = n(r)) != null ? s.cvcLength : void 0, i) >= 0) : t.length >= 3 && t.length <= 4 : !1
    }, e.payment.cardType = function (e) {
        var n;
        return e ? ((n = t(e)) != null ? n.type : void 0) || null : null
    }, e.payment.formatCardNumber = function (e) {
        var n, r, i, s;
        return n = t(e), n ? (i = n.length[n.length.length - 1], e = e.replace(/\D/g, ""), e = e.slice(0, +i + 1 || 9e9), n.format.global ? (s = e.match(n.format)) != null ? s.join(" ") : void 0 : (r = n.format.exec(e), r != null && r.shift(), r != null ? r.join(" ") : void 0)) : e
    }
}.call(this), function (e) {
    e(document).on("click", "[data-reveal-id]", function (t) {
        t.preventDefault();
        var n = e(this).attr("data-reveal-id");
        e("#" + n).reveal(e(this).data())
    }), e.fn.reveal = function (t) {
        var n = {animation:"fade", animationSpeed:300, closeOnBackgroundClick:!0, dismissModalClass:"reveal-modal-close", openComplete:function () {
        }, closeComplete:function () {
        }, revealBgColor:"#000"}, t = e.extend({}, n, t);
        return this.each(function () {
            function l() {
                e("." + t.dismissModalClass).unbind("click.modalEvent");
                var s = e("#content").width() / 2 - n.innerWidth() / 2;
                r || (d(), t.animation == "fadeAndPop" && (n.css({opacity:0, visibility:"visible"}), i.fadeIn(t.animationSpeed / 2), n.delay(t.animationSpeed / 2).animate({opacity:1}, t.animationSpeed, function () {
                    t.openComplete(), p()
                })), t.animation == "fade" && (n.css({opacity:0, visibility:"visible"}), i.fadeIn(t.animationSpeed / 2), n.delay(t.animationSpeed / 2).animate({opacity:1}, t.animationSpeed, function () {
                    t.openComplete(), p()
                })), t.animation == "none" && (n.css({visibility:"visible"}), i.css({display:"block"}), p())), n.unbind("reveal:open", l)
            }

            function c() {
                i.unbind("click.modalEvent"), r || (d(), t.animation == "fadeAndPop" && (i.delay(t.animationSpeed).fadeOut(t.animationSpeed), n.animate({opacity:0}, t.animationSpeed / 2, function () {
                    n.css({opacity:1, visibility:"hidden"}), t.closeComplete(), p()
                })), t.animation == "fade" && (i.delay(t.animationSpeed).fadeOut(t.animationSpeed), n.animate({opacity:0}, t.animationSpeed, function () {
                    n.css({opacity:1, visibility:"hidden"}), t.closeComplete(), p()
                })), t.animation == "none" && (n.css({visibility:"hidden"}), i.css({display:"none"}))), n.unbind("reveal:close", c)
            }

            function p() {
                r = !1
            }

            function d() {
                r = !0
            }

            var n = e(this), r = !1, i = e(".reveal-modal-bg"), s = n.css("position") == "absolute" ? "absolute" : "fixed", o = t.openComplete, u = e(window).height(), a = n.outerHeight(), f = (u - a) / 2;
            t.openComplete = s == "fixed" ? o : function () {
                e("html, body").animate({scrollTop:n.offset().top - (f < 0 ? 15 : f)}, 300, "easeOutQuad"), o()
            }, n.css({position:s, top:"50%", left:"50%", "margin-left":-n.outerWidth() / 2 + "px", "margin-top":-n.outerHeight() / 2 + "px", "z-index":2e5}), i.length == 0 && (i = e('<div class="reveal-modal-bg" style="background-color:' + t.revealBgColor + '" />').insertAfter(n), i.fadeTo("fast", .6)), n.bind("reveal:open", l), n.bind("reveal:close", c), n.trigger("reveal:open");
            var h = e("." + t.dismissModalClass).bind("click.modalEvent", function () {
                n.trigger("reveal:close")
            });
            t.closeOnBackgroundClick && (i.css({cursor:"pointer"}), i.bind("click.modalEvent", function () {
                n.trigger("reveal:close")
            })), e("body").keyup(function (e) {
                t.closeOnBackgroundClick && e.which === 27 && n.trigger("reveal:close")
            })
        })
    }
}(jQuery), function (e) {
    for (var t, n = document.getElementsByTagName("head")[0].style, r = ["transformProperty", "WebkitTransform", "OTransform", "msTransform", "MozTransform"], i = 0; i < r.length; i++)void 0 !== n[r[i]] && (t = r[i]);
    var s = !1;
    jQuery.fn.extend({rotate:function (t) {
        if (0 !== this.length && "undefined" != typeof t) {
            "number" == typeof t && (t = {angle:t});
            for (var n = [], r = 0, i = this.length; r < i; r++) {
                var s = this.get(r);
                if (!s.Wilq32 || !s.Wilq32.PhotoEffect) {
                    var o = e.extend(!0, {}, t), s = (new Wilq32.PhotoEffect(s, o))._rootObj;
                    n.push(e(s))
                } else s.Wilq32.PhotoEffect._handleRotation(t)
            }
            return n
        }
    }, getRotateAngle:function () {
        for (var e = [], t = 0, n = this.length; t < n; t++) {
            var r = this.get(t);
            r.Wilq32 && r.Wilq32.PhotoEffect && (e[t] = r.Wilq32.PhotoEffect._angle)
        }
        return e
    }, stopRotate:function () {
        for (var e = 0, t = this.length; e < t; e++) {
            var n = this.get(e);
            n.Wilq32 && n.Wilq32.PhotoEffect && clearTimeout(n.Wilq32.PhotoEffect._timer)
        }
    }}), Wilq32 = window.Wilq32 || {}, Wilq32.PhotoEffect = function () {
        return t ? function (e, t) {
            e.Wilq32 = {PhotoEffect:this}, this._img = this._rootObj = this._eventObj = e, this._handleRotation(t)
        } : function (e, t) {
            this._img = e, this._rootObj = document.createElement("span"), this._rootObj.style.display = "inline-block", this._rootObj.Wilq32 = {PhotoEffect:this}, e.parentNode.insertBefore(this._rootObj, e);
            if (e.complete)this._Loader(t); else {
                var n = this;
                jQuery(this._img).bind("load", function () {
                    n._Loader(t)
                })
            }
        }
    }(), Wilq32.PhotoEffect.prototype = {_setupParameters:function (e) {
        this._parameters = this._parameters || {}, "number" != typeof this._angle && (this._angle = 0), "number" == typeof e.angle && (this._angle = e.angle), this._parameters.animateTo = "number" == typeof e.animateTo ? e.animateTo : this._angle, this._parameters.step = e.step || this._parameters.step || null, this._parameters.easing = e.easing || this._parameters.easing || function (e, t, n, r, i) {
            return-r * ((t = t / i - 1) * t * t * t - 1) + n
        }, this._parameters.duration = e.duration || this._parameters.duration || 1e3, this._parameters.callback = e.callback || this._parameters.callback || function () {
        }, e.bind && e.bind != this._parameters.bind && this._BindEvents(e.bind)
    }, _handleRotation:function (e) {
        this._setupParameters(e), this._angle == this._parameters.animateTo ? this._rotate(this._angle) : this._animateStart()
    }, _BindEvents:function (e) {
        if (e && this._eventObj) {
            if (this._parameters.bind) {
                var t = this._parameters.bind, n;
                for (n in t)t.hasOwnProperty(n) && jQuery(this._eventObj).unbind(n, t[n])
            }
            this._parameters.bind = e;
            for (n in e)e.hasOwnProperty(n) && jQuery(this._eventObj).bind(n, e[n])
        }
    }, _Loader:function () {
        return s ? function (e) {
            var t = this._img.width, n = this._img.height;
            this._img.parentNode.removeChild(this._img), this._vimage = this.createVMLNode("image"), this._vimage.src = this._img.src, this._vimage.style.height = n + "px", this._vimage.style.width = t + "px", this._vimage.style.position = "absolute", this._vimage.style.top = "0px", this._vimage.style.left = "0px", this._container = this.createVMLNode("group"), this._container.style.width = t, this._container.style.height = n, this._container.style.position = "absolute", this._container.setAttribute("coordsize", t - 1 + "," + (n - 1)), this._container.appendChild(this._vimage), this._rootObj.appendChild(this._container), this._rootObj.style.position = "relative", this._rootObj.style.width = t + "px", this._rootObj.style.height = n + "px", this._rootObj.setAttribute("id", this._img.getAttribute("id")), this._rootObj.className = this._img.className, this._eventObj = this._rootObj, this._handleRotation(e)
        } : function (e) {
            this._rootObj.setAttribute("id", this._img.getAttribute("id")), this._rootObj.className = this._img.className, this._width = this._img.width, this._height = this._img.height, this._widthHalf = this._width / 2, this._heightHalf = this._height / 2;
            var t = Math.sqrt(this._height * this._height + this._width * this._width);
            this._widthAdd = t - this._width, this._heightAdd = t - this._height, this._widthAddHalf = this._widthAdd / 2, this._heightAddHalf = this._heightAdd / 2, this._img.parentNode.removeChild(this._img), this._aspectW = (parseInt(this._img.style.width, 10) || this._width) / this._img.width, this._aspectH = (parseInt(this._img.style.height, 10) || this._height) / this._img.height, this._canvas = document.createElement("canvas"), this._canvas.setAttribute("width", this._width), this._canvas.style.position = "relative", this._canvas.style.left = -this._widthAddHalf + "px", this._canvas.style.top = -this._heightAddHalf + "px", this._canvas.Wilq32 = this._rootObj.Wilq32, this._rootObj.appendChild(this._canvas), this._rootObj.style.width = this._width + "px", this._rootObj.style.height = this._height + "px", this._eventObj = this._canvas, this._cnv = this._canvas.getContext("2d"), this._handleRotation(e)
        }
    }(), _animateStart:function () {
        this._timer && clearTimeout(this._timer), this._animateStartTime = +(new Date), this._animateStartAngle = this._angle, this._animate()
    }, _animate:function () {
        var e = +(new Date), t = e - this._animateStartTime > this._parameters.duration;
        if (t && !this._parameters.animatedGif)clearTimeout(this._timer); else {
            (this._canvas || this._vimage || this._img) && this._rotate(~~(10 * this._parameters.easing(0, e - this._animateStartTime, this._animateStartAngle, this._parameters.animateTo - this._animateStartAngle, this._parameters.duration)) / 10), this._parameters.step && this._parameters.step(this._angle);
            var n = this;
            this._timer = setTimeout(function () {
                n._animate.call(n)
            }, 10)
        }
        this._parameters.callback && t && (this._angle = this._parameters.animateTo, this._rotate(this._angle), this._parameters.callback.call(this._rootObj))
    }, _rotate:function () {
        var e = Math.PI / 180;
        return s ? function (e) {
            this._angle = e, this._container.style.rotation = e % 360 + "deg"
        } : t ? function (e) {
            this._angle = e, this._img.style[t] = "rotate(" + e % 360 + "deg)"
        } : function (t) {
            this._angle = t, t = t % 360 * e, this._canvas.width = this._width + this._widthAdd, this._canvas.height = this._height + this._heightAdd, this._cnv.translate(this._widthAddHalf, this._heightAddHalf), this._cnv.translate(this._widthHalf, this._heightHalf), this._cnv.rotate(t), this._cnv.translate(-this._widthHalf, -this._heightHalf), this._cnv.scale(this._aspectW, this._aspectH), this._cnv.drawImage(this._img, 0, 0)
        }
    }()}, s && (Wilq32.PhotoEffect.prototype.createVMLNode = function () {
        document.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
        try {
            return!document.namespaces.rvml && document.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"), function (e) {
                return document.createElement("<rvml:" + e + ' class="rvml">')
            }
        } catch (e) {
            return function (e) {
                return document.createElement("<" + e + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')
            }
        }
    }())
}(jQuery), function (e) {
    function i(e) {
        return r.test(e)
    }

    e.fn.tipTip = function (t) {
        var n = {activation:"hover", keepAlive:!1, maxWidth:"200px", edgeOffset:0, defaultPosition:"bottom", delay:400, fadeIn:200, fadeOut:200, attribute:"title", content:!1, enter:function () {
        }, afterEnter:function () {
        }, exit:function () {
        }, afterExit:function () {
        }, cssClass:"", detectTextDir:!0};
        if (e("#tiptip_holder").length <= 0) {
            var r = e("<div>", {id:"tiptip_arrow_inner"}), s = e("<div>", {id:"tiptip_arrow"}).append(r), o = e("<div>", {id:"tiptip_content"}), u = e("<div>", {id:"tiptip_holder"}).append(s).append(o);
            e("body").append(u)
        } else var u = e("#tiptip_holder"), o = e("#tiptip_content"), s = e("#tiptip_arrow");
        return this.each(function () {
            function h() {
                if (f.enter.call(r, l) === !1)return;
                var t;
                f.content ? t = e.isFunction(f.content) ? f.content.call(r, l) : f.content : (t = f.content = r.attr(f.attribute), r.removeAttr(f.attribute));
                if (!t)return;
                o.html(t), u.hide().removeAttr("class").css({"max-width":f.maxWidth}), f.cssClass && u.addClass(f.cssClass), d(), c && clearTimeout(c), c = setTimeout(function () {
                    u.stop(!0, !0).fadeIn(f.fadeIn)
                }, f.delay), e(window).bind("resize.tipTip scroll.tipTip", d), r.addClass("tiptip_visible"), f.afterEnter.call(r, l)
            }

            function p() {
                if (f.exit.call(r, l) === !1)return;
                c && clearTimeout(c), u.fadeOut(f.fadeOut), e(window).unbind("resize.tipTip scroll.tipTip"), r.removeClass("tiptip_visible"), f.afterExit.call(r, l)
            }

            function d() {
                function L() {
                    m = g.top, h = n - v - f.edgeOffset - E / 2, p = a + (l - d) / 2
                }

                function A() {
                    m = g.bottom, h = n + c + f.edgeOffset + E / 2, p = a + (l - d) / 2
                }

                function O() {
                    m = g.left, h = n + (c - v) / 2, p = a - d - f.edgeOffset - w / 2
                }

                function M() {
                    m = g.right, h = n + (c - v) / 2, p = a + l + f.edgeOffset + w / 2
                }

                var t = r.offset(), n = t.top, a = t.left, l = r.outerWidth(), c = r.outerHeight(), h, p, d = u.outerWidth(), v = u.outerHeight(), m, g = {top:"tip_top", bottom:"tip_bottom", left:"tip_left", right:"tip_right"}, y, b, w = 12, E = 12, S = e(window), x = S.scrollTop(), T = S.scrollLeft(), N = S.width(), C = S.height(), k = f.detectTextDir && i(o.text());
                f.defaultPosition == "bottom" ? A() : f.defaultPosition == "top" ? L() : f.defaultPosition == "left" && !k ? O() : f.defaultPosition == "left" && k ? M() : f.defaultPosition == "right" && !k ? M() : f.defaultPosition == "right" && k ? O() : A(), m == g.left && !k && p < T ? M() : m == g.left && k && p - d < T ? M() : m == g.right && !k && p > T + N ? O() : m == g.right && k && p + d > T + N ? O() : m == g.top && h < x ? A() : m == g.bottom && h > x + C && L();
                if (m == g.left || m == g.right)h + v > C + x ? h = n + c > C + x ? n + c - v : C + x - v : h < x && (h = n < x ? n : x);
                if (m == g.top || m == g.bottom)p + d > N + T ? p = a + l > N + T ? a + l - d : N + T - d : p < T && (p = a < T ? a : T);
                u.css({left:Math.round(p), top:Math.round(h)}).removeClass(g.top).removeClass(g.bottom).removeClass(g.left).removeClass(g.right).addClass(m), m == g.top ? (y = v, b = a - p + (l - w) / 2) : m == g.bottom ? (y = -E, b = a - p + (l - w) / 2) : m == g.left ? (y = n - h + (c - E) / 2, b = d) : m == g.right && (y = n - h + (c - E) / 2, b = -w), s.css({left:Math.round(b), top:Math.round(y)})
            }

            var r = e(this), a = r.data("tipTip"), f = a && a.options || e.extend({}, n, t), l = {holder:u, content:o, arrow:s, options:f};
            if (a)switch (t) {
                case"show":
                    h();
                    break;
                case"hide":
                    p();
                    break;
                case"destroy":
                    r.unbind(".tipTip").removeData("tipTip");
                    break;
                case"position":
                    d()
            } else {
                var c = !1;
                r.data("tipTip", {options:f}), f.activation == "hover" ? r.bind("mouseenter.tipTip",function () {
                    h()
                }).bind("mouseleave.tipTip", function () {
                        f.keepAlive ? u.one("mouseleave.tipTip", function () {
                            p()
                        }) : p()
                    }) : f.activation == "focus" ? r.bind("focus.tipTip",function () {
                    h()
                }).bind("blur.tipTip", function () {
                        p()
                    }) : f.activation == "click" ? r.bind("click.tipTip",function (e) {
                    return e.preventDefault(), h(), !1
                }).bind("mouseleave.tipTip", function () {
                        f.keepAlive ? u.one("mouseleave.tipTip", function () {
                            p()
                        }) : p()
                    }) : f.activation == "manual"
            }
        })
    };
    var t = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-￿", n = "֑-߿יִ-﷽ﹰ-ﻼ", r = new RegExp("^[^" + t + "]*[" + n + "]")
}(jQuery), function (e, t, n, r, i) {
    var s = e(r), o = "waypoint.reached", u = function (e, n) {
        e.element.trigger(o, n), e.options.triggerOnce && e.element[t]("destroy")
    }, a = function (e, t) {
        if (!t)return-1;
        var n = t.waypoints.length - 1;
        while (n >= 0 && t.waypoints[n].element[0] !== e[0])n -= 1;
        return n
    }, f = [], l = function (t) {
        e.extend(this, {element:e(t), oldScroll:0, waypoints:[], didScroll:!1, didResize:!1, doScroll:e.proxy(function () {
            var t = this.element.scrollTop(), r = t > this.oldScroll, i = this, s = e.grep(this.waypoints, function (e, n) {
                return r ? e.offset > i.oldScroll && e.offset <= t : e.offset <= i.oldScroll && e.offset > t
            }), o = s.length;
            (!this.oldScroll || !t) && e[n]("refresh"), this.oldScroll = t;
            if (!o)return;
            r || s.reverse(), e.each(s, function (e, t) {
                (t.options.continuous || e === o - 1) && u(t, [r ? "down" : "up"])
            })
        }, this)}), e(t).bind("scroll.waypoints", e.proxy(function () {
            this.didScroll || (this.didScroll = !0, r.setTimeout(e.proxy(function () {
                this.doScroll(), this.didScroll = !1
            }, this), e[n].settings.scrollThrottle))
        }, this)).bind("resize.waypoints", e.proxy(function () {
            this.didResize || (this.didResize = !0, r.setTimeout(e.proxy(function () {
                e[n]("refresh"), this.didResize = !1
            }, this), e[n].settings.resizeThrottle))
        }, this)), s.load(e.proxy(function () {
            this.doScroll()
        }, this))
    }, c = function (t) {
        var n = null;
        return e.each(f, function (e, r) {
            if (r.element[0] === t)return n = r, !1
        }), n
    }, h = {init:function (r, i) {
        return this.each(function () {
            var s = e.fn[t].defaults.context, u, h = e(this);
            i && i.context && (s = i.context), e.isWindow(s) || (s = h.closest(s)[0]), u = c(s), u || (u = new l(s), f.push(u));
            var p = a(h, u), d = p < 0 ? e.fn[t].defaults : u.waypoints[p].options, v = e.extend({}, d, i);
            v.offset = v.offset === "bottom-in-view" ? function () {
                var t = e.isWindow(s) ? e[n]("viewportHeight") : e(s).height();
                return t - e(this).outerHeight()
            } : v.offset, p < 0 ? u.waypoints.push({element:h, offset:null, options:v}) : u.waypoints[p].options = v, r && h.bind(o, r), i && i.handler && h.bind(o, i.handler)
        }), e[n]("refresh"), this
    }, remove:function () {
        return this.each(function (t, n) {
            var r = e(n);
            e.each(f, function (e, t) {
                var n = a(r, t);
                n >= 0 && (t.waypoints.splice(n, 1), t.waypoints.length || (t.element.unbind("scroll.waypoints resize.waypoints"), f.splice(e, 1)))
            })
        })
    }, destroy:function () {
        return this.unbind(o)[t]("remove")
    }}, p = {refresh:function () {
        e.each(f, function (t, r) {
            var i = e.isWindow(r.element[0]), s = i ? 0 : r.element.offset().top, o = i ? e[n]("viewportHeight") : r.element.height(), a = i ? 0 : r.element.scrollTop();
            e.each(r.waypoints, function (e, t) {
                if (!t)return;
                var n = t.options.offset, i = t.offset;
                if (typeof t.options.offset == "function")n = t.options.offset.apply(t.element); else if (typeof t.options.offset == "string") {
                    var f = parseFloat(t.options.offset);
                    n = t.options.offset.indexOf("%") ? Math.ceil(o * (f / 100)) : f
                }
                t.offset = t.element.offset().top - s + a - n;
                if (t.options.onlyOnScroll)return;
                i !== null && r.oldScroll > i && r.oldScroll <= t.offset ? u(t, ["up"]) : i !== null && r.oldScroll < i && r.oldScroll >= t.offset ? u(t, ["down"]) : !i && r.element.scrollTop() > t.offset && u(t, ["down"])
            }), r.waypoints.sort(function (e, t) {
                return e.offset - t.offset
            })
        })
    }, viewportHeight:function () {
        return r.innerHeight ? r.innerHeight : s.height()
    }, aggregate:function () {
        var t = e();
        return e.each(f, function (n, r) {
            e.each(r.waypoints, function (e, n) {
                t = t.add(n.element)
            })
        }), t
    }};
    e.fn[t] = function (n) {
        if (h[n])return h[n].apply(this, Array.prototype.slice.call(arguments, 1));
        if (typeof n == "function" || !n)return h.init.apply(this, arguments);
        if (typeof n == "object")return h.init.apply(this, [null, n]);
        e.error("Method " + n + " does not exist on jQuery " + t)
    }, e.fn[t].defaults = {continuous:!0, offset:0, triggerOnce:!1, context:r}, e[n] = function (e) {
        return p[e] ? p[e].apply(this) : p.aggregate()
    }, e[n].settings = {resizeThrottle:200, scrollThrottle:100}, s.load(function () {
        e[n]("refresh")
    })
}(jQuery, "waypoint", "waypoints", window), NameParse = {parse:function (e) {
    e = this.trim(e);
    var t = e.split(" "), n = {}, r = [], i = "", s = "", o = "", u = 0, a = 0;
    for (a = 0; a < t.length; a++)t[a].indexOf("(") == -1 && (r[u++] = t[a]);
    var f = r.length, l = this.is_salutation(r[0]), c = this.is_suffix(r[r.length - 1]), h = l ? 1 : 0, p = c ? f - 1 : f;
    for (a = h; a < p - 1; a++) {
        word = r[a];
        if (this.is_compound_lastName(word) && a != h)break;
        this.is_initial(word) ? a == h ? this.is_initial(r[a + 1]) ? s += " " + word.toUpperCase() : o += " " + word.toUpperCase() : o += " " + word.toUpperCase() : s += " " + this.fix_case(word)
    }
    if (p - h > 1)for (u = a; u < p; u++)i += " " + this.fix_case(r[u]); else s = this.fix_case(r[a]);
    return n.salutation = l != 0 ? l : "", n.firstName = s != "" ? this.trim(s) : "", n.initials = o != "" ? this.trim(o) : "", n.lastName = i != "" ? this.trim(i) : "", n.suffix = c != 0 ? c : "", n
}, is_salutation:function (e) {
    return e = e.replace(".", "").toLowerCase(), e == "mr" || e == "master" || e == "mister" ? "Mr." : e == "mrs" ? "Mrs." : e == "miss" || e == "ms" ? "Ms." : e == "dr" ? "Dr." : e == "rev" ? "Rev." : e == "fr" ? "Fr." : !1
}, is_suffix:function (e) {
    e = e.replace(/\./g, "").toLowerCase();
    var t = ["I", "II", "III", "IV", "V", "Jr", "Sr", "PhD", "APR", "RPh", "PE", "MD", "DMD", "CME"];
    for (var n = 0; n < t.length; n++)if (t[n].toLowerCase() == e)return t[n];
    return!1
}, is_compound_lastName:function (e) {
    e = e.toLowerCase();
    var t = ["vere", "von", "van", "de", "del", "della", "di", "da", "pietro", "vanden", "du", "st.", "st", "la", "lo", "ter"];
    return this.in_array(t, e)
}, is_initial:function (e) {
    return e = e.replace(".", ""), e.length == 1
}, is_camel_case:function (e) {
    var t = /|[A-Z]+|s/, n = /|[a-z]+|s/;
    return e.match(t) != null && e.match(n) != null
}, fix_case:function (e) {
    return e = this.safe_ucfirst("-", e), e = this.safe_ucfirst(".", e), e
}, safe_ucfirst:function (e, t) {
    var n = [];
    parts = t.split(e);
    for (var r = 0; r < parts.length; r++) {
        var i = parts[r];
        n[r] = this.is_camel_case(i) ? i : this.ucfirst(i).toLowerCase()
    }
    return this.implode(n, e)
}, in_array:function (e, t) {
    for (var n = 0; n < e.length; n++)if (e[n] == t)return!0;
    return!1
}, implode:function (e, t) {
    var n = "", r = "";
    for (var i = 0; i < e.length; i++)n += r + e[i], r = t;
    return n
}, trim:function (e) {
    return e.replace(/^\s+|\s+$|\,$/g, "")
}, ucfirst:function (e) {
    return e.substr(0, 1).toUpperCase() + e.substr(1, e.length - 1).toLowerCase()
}};